
lib file = <file.ssz>;
lib s = <string.ssz>;
lib consts = <consts.ssz>;
lib mes = <alpha/mesdialog.ssz>;
lib tbl = <table.ssz>;
lib m = <math.ssz>;
lib chr = "char.ssz";
lib cmd = chr.cmd;
lib com = "common.ssz";
lib cfg = "config.ssz";

const ^/char enzansiMoji = "=<>|&+*/%^";
const ^/char kuuhaktokigou = " !()-,[]:"\"\t\r\n + enzansiMoji;

^/char errmes(^/char fn, ^/char line, index ln, ^/char mess)
{
  %char buf .= fn .= '(' .= ''(ln+1) .= ")"\r\n .= line .= \r\n .= mess;
  ret buf;
}

|CtrlTy
{
  Unknown,
  ChangeState, SelfState, ChangeAnim, ChangeAnim2,
  PosSet, PosAdd, VelSet, VelAdd, VelMul, Turn,
  VarSet, VarAdd, ParentVarSet, ParentVarAdd, VarRangeSet,
  VarRandom,
  CtrlSet, StateTypeSet, SprPriority,
  HitDef, Projectile, ReversalDef,
  AttackDist,
  HitOverride,
  Pause, SuperPause,
  LifeAdd, LifeSet, PowerAdd, PowerSet,
  TargetLifeAdd, TargetBind, BindToTarget, TargetState,
  TargetVelSet, TargetVelAdd, TargetFacing,
  TargetPowerAdd, TargetDrop,
  HitBy, NotHitBy, AttackMulSet, DefenceMulSet,
  MoveHitReset,
  AssertSpecial, PosFreeze, PlayerPush, Gravity,
  BindToParent, BindToRoot,
  Helper,
  DestroySelf,
  Explod, GameMakeAnim, ModifyExplod, ExplodBindTime, RemoveExplod,
  AfterImage, AfterImageTime, MakeDust,
  AngleDraw, AngleAdd, AngleMul, AngleSet,
  PalFX, AllPalFX, BGPalFX,
  Trans, Offset,
  HitVelSet, HitFallSet, HitFallVel, HitFallDamage, FallEnvShake,
  EnvColor, EnvShake,
  Width,
  ScreenBound,
  HitAdd,
  PlaySnd, StopSnd, SndPan,
  DisplayToClipboard, AppendToClipboard, ClearClipboard,
  TagIn, TagOut,
  ForceFeedback,
  VictoryQuote,
  RemapPal,
  Zoom,
  Null
}
&StateCtrl
{
  public %%char trigger;
  public %char triggerall;
  public %char task;
  public |.CtrlTy typ = .CtrlTy::Unknown;
}

&State
{
  public %&.StateCtrl ctrlList;
  public %char deftask;
  public |.chr.StTy typ;
  public |.chr.StTy phy;
  public |.chr.MovTy mov;
  public int hitcountpersist;
  public int hitdefpersist;
  public int movehitpersist;
  public int juggle;
  public int ignorehitpause;
  public int persistent;
  public int no;
  public bool i;
  new()
  {
    `clear();
  }
  public void clear()
  {
    `ctrlList.new(0);
    `deftask.new(0);
    `typ = .chr.StTy::S;
    `phy = .chr.StTy::N;
    `mov = .chr.MovTy::I;
    `hitcountpersist = 0;
    `hitdefpersist = 0;
    `movehitpersist = 0;
    `juggle = 0;
  }
  public void tmpreset()
  {
    `ignorehitpause = -1;
    `persistent = 1;
  }
}

&Data
{
  public int life;
  public int power;
  public int attack;
  public int defence;
  public float fall_defence_mul;
  public int liedown_time;
  public int airjuggle;
  public int sparkno;
  public int guard_sparkno;
  public int ko_echo;
  public int volume;
  public int intpersistindex;
  public int floatpersistindex;
  new()
  {
    `reset();
  }
  public void reset()
  {
    `life = 1000;
    `power = 3000;
    `attack = 100;
    `defence = 100;
    `fall_defence_mul = 3.0 / 2.0;
    `liedown_time = 60;
    `airjuggle = 15;
    `sparkno = 2;
    `guard_sparkno = 40;
    `ko_echo = 0;
    `volume = 256;
    `intpersistindex = 0;
    `floatpersistindex = 0;
  }
}
&Size
{
  public float xscale;
  public float yscale;
  public int ground_back;
  public int ground_front;
  public int air_back;
  public int air_front;
  public int height;
  public int attack_dist;
  public int proj_attack_dist;
  public int proj_doscale;
  public float proj_xscale;
  public float proj_yscale;
  public int head_posx;
  public int head_posy;
  public int mid_posx;
  public int mid_posy;
  public int shadowoffset;
  public int draw_offsetx;
  public int draw_offsety;
  public int z_width;
  public int attack_z_width_front;
  public int attack_z_width_back;
  new()
  {
    `reset();
  }
  public void reset()
  {
    `xscale = 1.0;
    `yscale = 1.0;
    `ground_back = 15;
    `ground_front = 16;
    `air_back = 12;
    `air_front = 12;
    `height = 60;
    `attack_dist = 160;
    `proj_attack_dist = 90;
    `proj_doscale = 0;
    `proj_xscale = 1.0;
    `proj_yscale = 1.0;
    `head_posx = -5;
    `head_posy = -90;
    `mid_posx = -5;
    `mid_posy = -60;
    `shadowoffset = 0;
    `draw_offsetx = 0;
    `draw_offsety = 0;
    `z_width = 3;
    `attack_z_width_front = 4;
    `attack_z_width_back = 4;
  }
}
&Velocity
{
  public float walk_fwd;
  public float walk_back;
  public float run_fwdx;
  public float run_fwdy;
  public float run_backx;
  public float run_backy;
  public float jump_neux;
  public float jump_neuy;
  public float jump_back;
  public float jump_fwd;
  public float runjump_backx;
  public float runjump_backy;
  public float runjump_fwdx;
  public float runjump_fwdy;
  public float airjump_neux;
  public float airjump_neuy;
  public float airjump_back;
  public float airjump_fwd;
  public float air_gethit_groundrecoverx;
  public float air_gethit_groundrecovery;
  public float air_gethit_airrecover_mulx;
  public float air_gethit_airrecover_muly;
  public float air_gethit_airrecover_addx;
  public float air_gethit_airrecover_addy;
  public float air_gethit_airrecover_back;
  public float air_gethit_airrecover_fwd;
  public float air_gethit_airrecover_up;
  public float air_gethit_airrecover_down;
  public float walk_up_x;
  public float walk_down_x;
  public float run_up_x;
  public float run_up_y;
  public float run_down_x;
  public float run_down_y;
  public float jump_up_x;
  public float jump_down_x;
  public float runjump_up_x;
  public float runjump_down_x;
  public float airjump_up_x;
  public float airjump_down_x;
  new()
  {
    `reset();
  }
  public void reset()
  {
    `walk_fwd = 0.0;
    `walk_back = 0.0;
    `run_fwdx = 0.0;
    `run_fwdy = 0.0;
    `run_backx = 0.0;
    `run_backy = 0.0;
    `jump_neux = 0.0;
    `jump_neuy = 0.0;
    `jump_back = 0.0;
    `jump_fwd = 0.0;
    `runjump_backx = 0.0;
    `runjump_backy = 0.0;
    `runjump_fwdx = 0.0;
    `runjump_fwdy = 0.0;
    `airjump_neux = 0.0;
    `airjump_neuy = 0.0;
    `airjump_back = 0.0;
    `airjump_fwd = 0.0;
    `air_gethit_groundrecoverx = -0.15;
    `air_gethit_groundrecovery = -3.5;
    `air_gethit_airrecover_mulx = 0.5;
    `air_gethit_airrecover_muly = 0.2;
    `air_gethit_airrecover_addx = 0.0;
    `air_gethit_airrecover_addy = -4.5;
    `air_gethit_airrecover_back = -1.0;
    `air_gethit_airrecover_fwd = 0.0;
    `air_gethit_airrecover_up = -2.0;
    `air_gethit_airrecover_down = 1.5;
    `walk_up_x = 0.0;
    `walk_down_x = 0.0;
    `run_up_x = 0.0;
    `run_up_y = 0.0;
    `run_down_x = 0.0;
    `run_down_y = 0.0;
    `jump_up_x = 0.0;
    `jump_down_x = 0.0;
    `runjump_up_x = 0.0;
    `runjump_down_x = 0.0;
    `airjump_up_x = 0.0;
    `airjump_down_x = 0.0;
  }
}
&Movement
{
  public int airjump_num;
  public int airjump_height;
  public float yaccel;
  public float stand_friction;
  public float crouch_friction;
  public float stand_friction_threshold;
  public float crouch_friction_threshold;
  public float air_gethit_groundlevel;
  public float air_gethit_groundrecover_ground_threshold;
  public float air_gethit_groundrecover_groundlevel;
  public float air_gethit_airrecover_threshold;
  public float air_gethit_airrecover_yaccel;
  public float air_gethit_trip_groundlevel;
  public float down_bounce_offsetx;
  public float down_bounce_offsety;
  public float down_bounce_yaccel;
  public float down_bounce_groundlevel;
  public float down_friction_threshold;
  new()
  {
    `reset();
  }
  public void reset()
  {
    `airjump_num = 0;
    `airjump_height = 35;
    `yaccel = 0.44;
    `stand_friction = 0.85;
    `crouch_friction = 0.82;
    `stand_friction_threshold = 2.0;
    `crouch_friction_threshold = 0.0;
    `air_gethit_groundlevel = 10.0;
    `air_gethit_groundrecover_ground_threshold = -20.0;
    `air_gethit_groundrecover_groundlevel = 10.0;
    `air_gethit_airrecover_threshold = -1.0;
    `air_gethit_airrecover_yaccel = 0.35;
    `air_gethit_trip_groundlevel = 15.0;
    `down_bounce_offsetx = 0.0;
    `down_bounce_offsety = 20.0;
    `down_bounce_yaccel = 0.4;
    `down_bounce_groundlevel = 12.0;
    `down_friction_threshold = 0.05;
  }
}
&Const
{
  public &.Data d;
  public &.Size s;
  public &.Velocity v;
  public &.Movement m;
  public void reset()
  {
    `d.reset();
    `s.reset();
    `v.reset();
    `m.reset();
  }
}

const ^/char sndstart =
  "bool f=false,lw=false,lp=false;int g=-1,s=0,ch=-1,vo=`mver0()==1?100:0;"
  "float p=0.0,fr=1.0;^float x=`sysfvar[.fX...fX+1];";
const ^/char sndend = "`playSound(f,lw,lp,g,s,ch,vo,p,fr,x);";
public &StateBuilder
{
  &StateNo
  {
    public int no;
    public bool i;
    public ^/char proc;
    public void set(int no, bool i, ^/char proc)
    {
      `no = no;
      `i = i;
      `proc = proc;
    }
  }
  public ^/char cmd;
  public ^/char cns;
  public %^/char st;
  public ^/char stcommon;
  public %&StateNo stnoList;
  public &.tbl.IntTable!long, bool? stnoTable;
  public &.State state;
  public ^/char lasterror, errorexp;
  public &.Const c;
  public int playerno = 0;
  public short mver0 = 0, mver1 = 0;
  ^&.cmd.CommandList cmdl;
  ^/char maeOp, this = "`";
  type paraF_t = $bool(^/char=);
  ^bool t;
  bool usiroOp = true, norange = false;
  new()
  {
    `t.new(1);
    `t<> = true;
  }
  bool existState(int no, bool iflag)
  {
    ret #`stnoTable.get((long)iflag << 32 | no) > 0;
  }
  void skipBlank(^/char text=)
  {
    index i = 0;
    loop{while; do:
      if(!.s.cMatch!char?(.s.blank, text[i])) break;
      i++;
    while i < #text:}
    text = text[i..-1];
  }
  ^/char tokenizer(^/char text=)
  {
    `skipBlank(text=);
    if(#text == 0) ret "";
    switch(text<>){
    case '=':
      text = text[1..-1];
      ret "=";
    case ':':
      branch{
      cond #text >= 2 && text[1] == '=':
        text = text[2..-1];
        ret ":=";
      else:
        text = text[1..-1];
        ret ":";
      }
    case '!':
      text = text[1..-1];
      branch{
      cond #text >= 1 && text[0] == '=':
        text = text[1..-1];
        ret "!=";
      else:
        ret "!";
      }
    case '>':
      text = text[1..-1];
      branch{
      cond #text >= 1 && text[0] == '=':
        text = text[1..-1];
        ret ">=";
      else:
        ret ">";
      }
    case '<':
      text = text[1..-1];
      branch{
      cond #text >= 1 && text[0] == '=':
        text = text[1..-1];
        ret "<=";
      else:
        ret "<";
      }
    case '~':
      text = text[1..-1];
      ret "~";
    case '&':
      branch{
      cond #text >= 2 && text[1] == '&':
        text = text[2..-1];
        ret "&&";
      else:
        text = text[1..-1];
        ret "&";
      }
    case '^':
      branch{
      cond #text >= 2 && text[1] == '^':
        text = text[2..-1];
        ret "^^";
      else:
        text = text[1..-1];
        ret "^";
      }
    case '|':
      branch{
      cond #text >= 2 && text[1] == '|':
        text = text[2..-1];
        ret "||";
      else:
        text = text[1..-1];
        ret "|";
      }
    case '+':
      text = text[1..-1];
      ret "+";
    case '-':
      text = text[1..-1];
      ret "-";
    case '*':
      branch{
      cond #text >= 2 && text[1] == '*':
        text = text[2..-1];
        ret "**";
      else:
        text = text[1..-1];
        ret "*";
      }
    case '/':
      text = text[1..-1];
      ret "/";
    case '%':
      text = text[1..-1];
      ret "%";
    case ',':
      text = text[1..-1];
      ret ",";
    case '(':
      text = text[1..-1];
      ret "(";
    case ')':
      text = text[1..-1];
      ret ")";
    case '[':
      text = text[1..-1];
      ret "[";
    case ']':
      text = text[1..-1];
      ret "]";
    case '"':
      text = text[1..-1];
      ret \";
    }
    index i = 0;
    bool ten = false;
    loop{do:
      if((text[i] < '0' || text[i] > '9') && (ten || text[i] != '.')) break;
      ten |= text[i] == '.';
      i++;
    while i < #text:}
    if(i > 0 && (text[i] == 'e' || text[i] == 'E')) loop{
      index j = i + 1;
      while;
    do:
      if(
        (text[i] < '0' || text[i] > '9')
        && (i != j || (text[i] != '-' && text[i] != '+'))) break;
    while ++i < #text:}
    if(i == 0) i = .s.cFind(.kuuhaktokigou, text);
    ^/char tok = .s.toLower(text[0..i]);
    text = text[i..-1];
    ret tok;
  }
  int isOperator(^/char token)
  {
    if(#token == 0 || token<> == ',' || token<> == ')' || token<> == ']'){
      ret -1;
    }
    if(.s.equ("||", token)) ret 1;
    if(.s.equ("^^", token)) ret 2;
    if(.s.equ("&&", token)) ret 3;
    if(.s.equ("|", token)) ret 4;
    if(.s.equ("^", token)) ret 5;
    if(.s.equ("&", token)) ret 6;
    if(.s.equ("=", token) || .s.equ("!=", token)) ret 7;
    if(
      .s.equ(">", token) || .s.equ(">=", token)
      || .s.equ("<", token) || .s.equ("<=", token)) ret 8;
    if(.s.equ("+", token) || .s.equ("-", token)) ret 9;
    if(.s.equ("*", token) || .s.equ("/", token) || .s.equ("%", token)) ret 10;
    if(.s.equ("**", token)) ret 11;
    ret 0;
  }
  bool operator(^/char op=, ^/char in=, ^/char oldin=)
  {
    oldin = in;
    op = `tokenizer(in=);
    if(#`maeOp == 0) ret true;
    int ope = `isOperator(op);
    if(ope <= `isOperator(`maeOp)){
      if(
        ope < 0 || (
          (!`usiroOp || op<> != '(')
          && (op<> < 'A' || op<> > 'Z') && (op<> < 'a' || op<> > 'z')))
      {
        `lasterror = `maeOp + "が不正です";
        ret false;
      }
      in = oldin;
      oldin = `maeOp + " " + oldin;
      op = `maeOp;
      `maeOp = "";
      `norange = true;
    }
    ret true;
  }
  ^/char fToS(float f)
  {
    if(!.m.isfinite(f)){
      ret .m.isnan(f) ? "(0.0/0.0)" : (f < 0.0 ? "(-1.0/0.0)" : "(1.0/0.0)");
    }
    ret ''f;
  }
  bool intRange(
    int min=, bool minequ=, int max=, bool maxequ=, ^/char token, ^/char in=)
  {:<-
    bool integer(int val=, ^/char token, ^/char in=)
    {
      ^/char istr = token;
      bool minus = false;
      loop{while; do:
        minus = minus || .s.equ("-", istr);
        istr = `tokenizer(in=);
      while .s.equ("-", istr) || .s.equ("+", istr):}
      if(#istr == 0 || istr<> < '0' || '9' < istr<>){
        `lasterror = "数字の読み込みエラーです";
        ret false;
      }
      val = .com.atoi(istr) * (minus ? -1 : 1);
      ret true;
    }
    minequ = .s.equ("[", token);
    if(!minequ && !.s.equ("(", token)){
      `lasterror = "'['か'('がありません";
      ret false;
    }
    branch{
    cond .cfg.IgnoreMostErrors:
      if(!integer(min=, `tokenizer(in=), in=)) ret false;
    else:
      if(!`integer2(min=, `tokenizer(in=), in=)) ret false;
    }
    ^/char tkn;
    branch{
    cond .cfg.IgnoreMostErrors:
      {
        index findi = .s.find(",", in);
        if(findi < 0) break;
        tkn = in[findi .. findi+1];
        in = in[findi+1 .. -1];
      }
    else:
      tkn = `tokenizer(in=);
    }
    if(!.s.equ(",", tkn)){
      `lasterror = "','がありません";
      ret false;
    }
    branch{
    cond .cfg.IgnoreMostErrors:
      if(!integer(max=, `tokenizer(in=), in=)) ret false;
    else:
      if(!`integer2(max=, `tokenizer(in=), in=)) ret false;
    }
    branch{
    cond .cfg.IgnoreMostErrors:
      {
        index findi = .s.cFind("])", in);
        if(findi < 0) break;
        tkn = in[findi .. findi+1];
        in = in[findi+1 .. -1];
      }
    else:
      tkn = `tokenizer(in=);
    }
    maxequ = .s.equ("]", tkn);
    if(!maxequ && !.s.equ(")", tkn)){
      `lasterror = "']'か')'がありません";
      ret false;
    }
    ret true;
  }
  bool integer2(int val=, ^/char token, ^/char in=)
  {
    ^/char istr = token;
    bool minus = .s.equ("-", istr);
    if(minus) istr = in;
    if(#istr == 0 || istr<> < '0' || '9' < istr<>){
      `lasterror = "数字の読み込みエラーです";
      ret false;
    }
    if(minus) istr = `tokenizer(in=);
    loop{index i = 0; while; do:
      if(istr[i] < '0' || '9' < istr[i]){
        `lasterror = istr + "が整数でありません";
        ret false;
      }
      i++;
    while i < #istr:}
    val = .com.atoi(istr) * (minus ? -1 : 1);
    ret true;
  }
  void kyuushikiThroughNeo(bool range, ^/char in=)
  {
    if(.cfg.IgnoreMostErrors) loop{index i = 0; while; do:
      if(
        ('0' <= in[i] && in[i] <= '9') || in[i] == '-'
        || (range && (in[i] == '[' || in[i] == '('))) break;
      i++;
    while i < #in:
    break:
      in = in[i .. -1];
    }
  }
  ^/char number(^/char token, int typ=)
  {
    if(
      #token == 0 || (
        !.m.inRange!char?('0', '9', token[0])
        && token[0] != '.' && (#token < 2 || token[0] != '-'))) ret "";
    double d;
    %char rtn;
    branch{
      ^/char t = token;
      index i = .s.find(".", t);
    cond i >= 0:
      {
        index ei = .s.cFind("Ee", t);
        if(ei == i + 1){
          t = t[0 .. ei] + "0" + t[ei .. -1];
        }
      }
      if(!.s.sToNumber!d.self?(d=, t)) ret "";
      branch{
      cond .m.isnan(d):
        rtn .= ".v.setSF()";
        typ = 0;
      cond .m.isfinite(d):
        rtn .= ''d;
        typ = 1;
      cond d > 0.0:
        rtn .= "(1.0/0.0)";
        typ = 1;
      else:
        rtn .= "(-1.0/0.0)";
        typ = 1;
      }
    else:
      if(!.s.sToNumber!d.self?(d=, t + ".0")) ret "";
      branch{
      cond .m.isnan(d):
        rtn .= ".v.setSF()";
        typ = 0;
      cond d < (double).consts.int_t::MIN:
        rtn .= "(int)" .= ''.consts.int_t::MIN;
        typ = 2;
      cond d > (double).consts.int_t::MAX:
        rtn .= "(int)" .= ''.consts.int_t::MAX;
        typ = 2;
      else:
        rtn .= "(int)" .= ''(int)d;
        typ = 2;
      }
    }
    `usiroOp = false;
    ret rtn;
  }
  bool attr(int flg=, ^/char text, bool hitdef)
  {
    flg = 0;
    ^^/char hit = .s.split(",", text);
    ^/char foo = .s.trim(hit[0]);
    loop{index i = 0; while; do:
      switch(foo[i]){
      case 'S', 's':
        if(hitdef) flg = 0;
        flg |= (int).chr.StTy::S;
      case 'C', 'c':
        if(hitdef) flg = 0;
        flg |= (int).chr.StTy::C;
      case 'A', 'a':
        if(hitdef) flg = 0;
        flg |= (int).chr.StTy::A;
      default:
        if(
          .cfg.IgnoreMostErrors && foo[i] < '\x80'
          && (foo[i] < 'A' || 'Z' < foo[i]) && (foo[i] < 'a' || 'z' < foo[i]))
        {
          ret true;
        }
        `lasterror = hit[0] + "が無効な値です";
        ret false;
      }
    continue:
      i++;
    while i < #foo:}
    loop{
      index i = 1;
      int hitdefflg = flg;
      ^/char tmp;
      while;
    do:
      foo = .s.trim(hit[i]);
      branch{
        tmp = .s.toLower(.s.trim(foo[0..2]));
      cond !.cfg.IgnoreMostErrors && #foo > 2:
        else;
      cond .s.equ(tmp, "na"): flg |= (int).chr.AtTy::NA;
      cond .s.equ(tmp, "nt"): flg |= (int).chr.AtTy::NT;
      cond .s.equ(tmp, "np"): flg |= (int).chr.AtTy::NP;
      cond .s.equ(tmp, "sa"): flg |= (int).chr.AtTy::SA;
      cond .s.equ(tmp, "st"): flg |= (int).chr.AtTy::ST;
      cond .s.equ(tmp, "sp"): flg |= (int).chr.AtTy::SP;
      cond .s.equ(tmp, "ha"): flg |= (int).chr.AtTy::HA;
      cond .s.equ(tmp, "ht"): flg |= (int).chr.AtTy::HT;
      cond .s.equ(tmp, "hp"): flg |= (int).chr.AtTy::HP;
      cond .s.equ(tmp, "aa"):
        flg |= (int).chr.AtTy::NA|(int).chr.AtTy::SA|(int).chr.AtTy::HA;
      cond .s.equ(tmp, "at"):
        flg |= (int).chr.AtTy::NT|(int).chr.AtTy::ST|(int).chr.AtTy::HT;
      cond .s.equ(tmp, "ap"):
        flg |= (int).chr.AtTy::NP|(int).chr.AtTy::SP|(int).chr.AtTy::HP;
      cond .s.equ(tmp, "n"):
        flg |= (int).chr.AtTy::NA|(int).chr.AtTy::NT|(int).chr.AtTy::NP;
      cond .s.equ(tmp, "s"):
        flg |= (int).chr.AtTy::SA|(int).chr.AtTy::ST|(int).chr.AtTy::SP;
      cond .s.equ(tmp, "h") || .s.equ(tmp, "a"):
        flg |= (int).chr.AtTy::HA|(int).chr.AtTy::HT|(int).chr.AtTy::HP;
      cond .cfg.IgnoreMostErrors && `mver0 == 1:
        ret true;
      else:
        `lasterror = hit[i] + "が無効な値です";
        ret false;
      }
      if(hitdef && i == 1) hitdefflg = flg;
      if(#foo > 2) break;
      i++;
    while i < #hit:
    break:
      if(hitdef) flg = hitdefflg;
    }
    ret true;
  }
  bool trgAttr(int flg=, ^/char in=)
  {
    flg = 0;
    `skipBlank(in=);
    loop{index i = 0; while; do:
      switch(in[i]){
      case 'S', 's':
        flg |= (int).chr.StTy::S;
      case 'C', 'c':
        flg |= (int).chr.StTy::C;
      case 'A', 'a':
        flg |= (int).chr.StTy::A;
      default:
        `lasterror =
          in[0 .. .s.cFind(.kuuhaktokigou, in)] + "が不正な属性値です";
        ret false;
      }
    continue:
      i++;
    while i < #in && !.s.cMatch!char?(.kuuhaktokigou, in[i]):
      in = in[i .. -1];
    }
    loop{
      ^/char oldin, tmp;
      continue;
    do:
      oldin = in;
      in = in[1..-1];
      `skipBlank(in=);
      tmp = .s.toLower(in[0 .. .s.cFind(.kuuhaktokigou, in)]);
      branch{
      cond .s.equ(tmp, "na"): flg |= (int).chr.AtTy::NA;
      cond .s.equ(tmp, "nt"): flg |= (int).chr.AtTy::NT;
      cond .s.equ(tmp, "np"): flg |= (int).chr.AtTy::NP;
      cond .s.equ(tmp, "sa"): flg |= (int).chr.AtTy::SA;
      cond .s.equ(tmp, "st"): flg |= (int).chr.AtTy::ST;
      cond .s.equ(tmp, "sp"): flg |= (int).chr.AtTy::SP;
      cond .s.equ(tmp, "ha"): flg |= (int).chr.AtTy::HA;
      cond .s.equ(tmp, "ht"): flg |= (int).chr.AtTy::HT;
      cond .s.equ(tmp, "hp"): flg |= (int).chr.AtTy::HP;
      cond .s.equ(tmp, "aa"):
        flg |= (int).chr.AtTy::NA|(int).chr.AtTy::SA|(int).chr.AtTy::HA;
      cond .s.equ(tmp, "at"):
        flg |= (int).chr.AtTy::NT|(int).chr.AtTy::ST|(int).chr.AtTy::HT;
      cond .s.equ(tmp, "ap"):
        flg |= (int).chr.AtTy::NP|(int).chr.AtTy::SP|(int).chr.AtTy::HP;
      cond .s.equ(tmp, "n"):
        flg |= (int).chr.AtTy::NA|(int).chr.AtTy::NT|(int).chr.AtTy::NP;
      cond .s.equ(tmp, "s"):
        flg |= (int).chr.AtTy::SA|(int).chr.AtTy::ST|(int).chr.AtTy::SP;
      cond .s.equ(tmp, "h") || .s.equ(tmp, "a"):
        flg |= (int).chr.AtTy::HA|(int).chr.AtTy::HT|(int).chr.AtTy::HP;
      else:
        in = oldin;
        break, break;
      }
      in = in[#tmp .. -1];
    continue:
      `skipBlank(in=);
    while #in > 0 && in<> == ',':}
    ret true;
  }
  bool kakkotojiru(^/char in=)
  {
    `usiroOp = true;
    ^/char oldin = in;
    ^/char token = `tokenizer(in=);
    if(.s.equ(")", token)) ret true;
    `lasterror = token + "の前に')'がありません";
    ret false;
  }
  bool kyuushiki(bool not=, ^/char in=)
  {
    not = false;
    loop{
      ^/char token;
    do:
      token = `tokenizer(in=);
      if(#token > 0) branch{
      cond .s.equ("!=", token):
        not = true;
        break, break;
      cond .s.equ("=", token):
        break, break;
      cond .cfg.IgnoreMostErrors:
        if(token[-1] == '=') break, break;
        break, while;
      }
      `lasterror = "'='か'!='がありません";
      ret false;
    while #token > 0:}
    ret true;
  }
  bool kyuushikiSuperDX(%char out=, ^/char in=, int typ=, bool hissu)
  {
    ^/char oldin = in, token = `tokenizer(in=);
    bool comma = false, hikaku = true;
    if(.s.equ(",", token)){
      comma = true;
      oldin = in;
      token = `tokenizer(in=);
    }
    branch{
      int val;
    cond .s.equ("<", token):
      out .= ".v.toI()<";
    cond .s.equ(">", token):
      out .= ".v.toI()>";
    cond .s.equ("<=", token):
      out .= ".v.toI()<=";
    cond .s.equ(">=", token):
      out .= ".v.toI()>=";
    else:
      branch{
        bool not;
      cond .s.equ("!=", token):
        not = true;
      cond .s.equ("=", token):
        not = false;
      else:
        if(hissu && !comma){
          `lasterror = "比較演算子がありません";
          ret false;
        }
        hikaku = false;
        not = false;
        in = oldin;
      comm:
        if(hikaku) `kyuushikiThroughNeo(true, in=);
        oldin = in;
        token = `tokenizer(in=);
        branch{
        cond .s.equ("[", token) || .s.equ("(", token):
          {
            int min, max;
            bool minequ, maxequ;
            if(!`intRange(min=, minequ=, max=, maxequ=, token, in=)){
              ret false;
            }
            out .=
              (not ? "!" : "") .= "(.v.toI()"
              .= (minequ ? ">=" : ">") .= ''min
              .= "&&" .= ".v.toI()"
              .= (maxequ ? "<=" : "<") .= ''max .= ')';
          }
        else:
          out .= ".v.toI()" .= (not ? "!=" : "==");
          if(!`integer2(val=, token, in=)){
            if(hissu && !hikaku){
              `lasterror = "比較演算子がありません";
              ret false;
            }
            if(hikaku){
              `lasterror = "数字がありません";
              ret false;
            }
            in = oldin;
            out .= "0";
            break, break;
          }
          out .= ''val;
        }
      }
      break;
    comm:
      `kyuushikiThroughNeo(false, in=);
      token = `tokenizer(in=);
      if(!`integer2(val=, token, in=)){
        `lasterror = "数字がありません";
        ret false;
      }
      out .= ''val;
    }
    typ = 3;
    `usiroOp = comma || hikaku;
    ret true;
  }
  int oneArg(^/char fun, %char out=, ^/char in=)
  {
    if(!.s.equ("(", `tokenizer(in=))){
      `lasterror = fun + "の次に'('がありません";
      ret -1;
    }
    int typ;
    if(`expBoolOr(out=, in=)=>typ < 0) ret -1;
    if(!`kakkotojiru(in=)) ret -1;
    ret typ;
  }
  ^/char rdObjName(^/char obj)
  {
    if(.s.equ(obj, "`")) ret "_";
    ret "_" + obj[0 .. #obj-1];
  }
  int expRedirectable(^/char obj, ^/char name, %char out=, ^/char in=)
  {:<-
    int var(
      ^/char obj, ^/char vtkn, ^/char v, %char out=, ^/char in=, int vtyp)
    {
      %char buf, temp;
      int typ;
      if(`oneArg(vtkn, temp=, in=)=>typ < 0) ret -1;
      `expCast(buf=, 2, typ, temp);
      ^/char oldin = in;
      branch{
        int tmp;
      cond .s.equ(`tokenizer(in=), ":="):
        out .= obj .= "trSet" .= v .= '(' .= buf .= ',';
        if(!`typeExp!`expEqu?(out=, in=, vtyp)) ret -1;
        out .= ')';
        typ = vtyp;
      cond <consteval>(tmp=, buf) && tmp >= 0:
        branch{
        cond .s.equ(v, "IVar"):
          if(tmp >= 60) break, else;
          out .= obj .= "ivar[" .= ''tmp .= ']';
        cond .s.equ(v, "FVar"):
          if(tmp >= 40) break, else;
          out .= obj .= "fvar[" .= ''tmp .= ']';
        cond .s.equ(v, "SysIVar"):
          if(tmp >= 5) break, else;
          out .= obj .= "sysivar[" .= ''tmp .= ']';
        cond .s.equ(v, "SysFVar"):
          if(tmp >= 5) break, else;
          out .= obj .= "sysfvar[" .= ''tmp .= ']';
        }
        in = oldin;
        typ = vtyp;
      else:
        in = oldin;
        out .= obj .= "tr" .= v .= '(' .= buf .= ')';
        typ = 0;
      }
      ret typ;
    }
    bool eqneq(%char out=, ^/char in=, int typ=, ~$bool() proc)
    {
      bool not;
      if(!`kyuushiki(not=, in=)) ret false;
      if(not) out .= " !(";
      if(!proc(::)) ret false;
      if(not) out .= ')';
      typ = 3;
      ret true;
    }
    bool eqneq2(%char out=, ^/char in=, int typ=, ~$bool(%char=) proc)
    {
      bool not;
      if(!`kyuushiki(not=, in=)) ret false;
      typ = 3;
      %char buf;
      if(!proc(:buf=:)) ret false;
      branch{
      cond !not:
        out .= buf;
      cond typ == 0:
        out .= '(' .= buf .= "$.v.isSF()?.none:.v.setB(!.v.isT()))";
      else:
        out .= " !(" .= buf .= ')';
      }
      ret true;
    }
    `usiroOp = true;
    `norange = false;
    int typ = 0;
    %char temp;
    ^/char num = `number(name, typ=);
    out .= num;
    if(#num == 0) branch{
      ^/char token = name;
    cond .s.equ("(", token):
      if(`expBoolOr(out=, in=)=>typ < 0 || !`kakkotojiru(in=)) ret -1;
    cond .s.equ("-", token):
      branch{
      cond #in > 0 && .m.inRange!char?('0', '9', in[0]) || in[0] == '.':
        token = `tokenizer(in=);
        num = `number("-" + token, typ=);
        if(#num == 0) break, else;
        out .= ' ' .= num;
      else:
        if(`expValue(temp=, in=)=>typ < 0) ret -1;
        branch{
        cond typ == 0:
          out .= temp .= "$`trMinus()";
        cond typ == 3:
          out .= " -(int)(" .= temp .= ')';
          typ = 2;
        else:
          out .= " -(" .= temp .= ')';
        }
      }
    cond .s.equ("~", token):
      out .= " !(";
      if(!`typeExp!`expValue?(out=, in=, 2)) ret -1;
      out .= ')';
      typ = 2;
    cond .s.equ("!", token):
      out .= " !(";
      if(!`typeExp!`expValue?(out=, in=, 3)) ret -1;
      out .= ')';
      typ = 3;
    cond .s.equ("abs", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      branch{
      cond typ == 0:
        out .= temp .= "$`trAbs()";
      cond typ == 3:
        out .= "#(int)(" .= temp .= ')';
        typ = 2;
      else:
        out .= "#(" .= temp .= ')';
      }
    cond .s.equ("floor", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      branch{
      cond typ == 0:
        out .= temp .= "$`trFloor()";
      cond typ == 1:
        out .= "(int).m.floor(" .= temp .= ')';
        typ = 2;
      else:
        out .= temp;
      }
    cond .s.equ("ceil", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      branch{
      cond typ == 0:
        out .= temp .= "$`trCeil()";
      cond typ == 1:
        out .= "(int).m.ceil(" .= temp .= ')';
        typ = 2;
      else:
        out .= temp;
      }
    cond .s.equ("pi", token):
      out .= ".m.PI";
      typ = 1;
    cond .s.equ("e", token):
      out .= ".m.E";
      typ = 1;
    cond .s.equ("sin", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      branch{
      cond typ == 0:
        out .= temp .= "$`trSin()";
      else:
        out .= ".m.sin(";
        `expCast(out=, 1, typ, temp);
        out .= ')';
        typ = 1;
      }
    cond .s.equ("cos", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      branch{
      cond typ == 0:
        out .= temp .= "$`trCos()";
      else:
        out .= ".m.cos(";
        `expCast(out=, 1, typ, temp);
        out .= ')';
        typ = 1;
      }
    cond .s.equ("tan", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      branch{
      cond typ == 0:
        out .= temp .= "$`trTan()";
      else:
        out .= ".m.tan(";
        `expCast(out=, 1, typ, temp);
        out .= ')';
        typ = 1;
      }
    cond .s.equ("asin", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      `expCast(out=, 0, typ, temp);
      out .= "$`trAsin()";
      typ = 0;
    cond .s.equ("acos", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      `expCast(out=, 0, typ, temp);
      out .= "$`trAcos()";
      typ = 0;
    cond .s.equ("atan", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      branch{
      cond typ == 0:
        out .= temp .= "$`trAtan()";
      else:
        out .= ".m.atan(";
        `expCast(out=, 1, typ, temp);
        out .= ')';
        typ = 1;
      }
    cond .s.equ("ln", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      `expCast(out=, 0, typ, temp);
      out .= "$`trLn()";
      typ = 0;
    cond .s.equ("log", token):
      if(!.s.equ("(", `tokenizer(in=))){
        `lasterror = token + "の次に(がありません";
        ret -1;
      }
      out .= "`trLog(";
      if(!`typeExp!`expBoolOr?(out=, in=, 0)) ret -1;
      out .= "$.v,";
      if(!.s.equ(",", `tokenizer(in=))){
        `lasterror = token + "は引数が2個必要です";
        ret -1;
      }
      if(!`typeExp!`expBoolOr?(out=, in=, 0)) ret -1;
      out .= "$.v)";
      if(!`kakkotojiru(in=)) ret -1;
      typ = 0;
    cond .s.equ("exp", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      branch{
      cond typ == 0:
        out .= temp .= "$`trExp()";
      else:
        out .= ".m.exp(";
        `expCast(out=, 1, typ, temp);
        out .= ')';
        typ = 1;
      }
    cond .s.equ("ifelse", token):
      out .= "`trIfelse(";
      if(!.s.equ("(", `tokenizer(in=))){
        `lasterror = token + "の次に'('がありません";
        ret -1;
      }
      if(!`typeExp!`expBoolOr?(out=, in=, 3)) ret -1;
      out .= ',';
      if(!.s.equ(",", `tokenizer(in=))){
        `lasterror = token + "は引数が3個必要です";
        ret -1;
      }
      if(!`typeExp!`expBoolOr?(out=, in=, 0)) ret -1;
      out .= "$.v,";
      if(!.s.equ(",", `tokenizer(in=))){
        `lasterror = token + "は引数が3個必要です";
        ret -1;
      }
      if(!`typeExp!`expBoolOr?(out=, in=, 0)) ret -1;
      out .= "$.v)";
      if(!`kakkotojiru(in=)) ret -1;
      typ = 0;
    cond .s.equ("random", token):
      out .= ".m.rand(0,999)";
      typ = 2;
    cond .s.equ("gametime", token):
      out .= ".com.gametime";
      typ = 2;
    cond .s.equ("matchover", token):
      out .= ".com.matchOver()";
      typ = 3;
    cond .s.equ("matchno", token):
      out .= "`trMatchNo()";
      typ = 2;
    cond .s.equ("roundno", token):
      out .= ".com.round";
      typ = 2;
    cond .s.equ("tickspersecond", token):
      out .= ".cfg.GameSpeed";
      typ = 2;
    cond .s.equ("playeridexist", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      `expCast(out=, 0, typ, temp);
      out .= "$`trPlayerIDExist()";
      typ = 0;
    cond .s.equ("anim", token):
      out .= obj .= "animno";
      typ = 2;
    cond .s.equ("animtime", token):
      out .= obj .= "trAnimTime()";
      typ = 2;
    cond .s.equ("time", token) || .s.equ("statetime", token):
      out .= obj .= "stVal.time";
      typ = 2;
    cond .s.equ("animelem", token):
      {
        bool not;
        if(!`kyuushiki(not=, in=)) ret -1;
        if(not && !.cfg.IgnoreMostErrors){
          `lasterror = "animelemに != は使えません";
          ret -1;
        }
        token = `tokenizer(in=);
        if(.s.equ("-", token)){
          `lasterror = "マイナスが付くとエラーです";
          ret -1;
        }
        int val;
        if(!`integer2(val=, token, in=)) ret -1;
        if(val <= 0){
          `lasterror = "animelemのは0より大きくなければいけません";
          ret -1;
        }
        out .=
          obj .= "trAnimElemTime("
          .= ''val .= ")$(.v.isSF()?.none:.v.setB(";
        if(!`kyuushikiSuperDX(out=, in=, typ=, false)) ret -1;
        out .= "))";
        typ = 0;
      }
    cond .s.equ("animelemtime", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      out .= obj .= "trAnimElemTime(";
      `expCast(out=, 2, typ, temp);
      out .= ')';
      typ = 0;
    cond .s.equ("animelemno", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      out .= obj .= "trAnimElemNo(";
      `expCast(out=, 2, typ, temp);
      out .= ')';
      typ = 0;
    cond .s.equ("timemod", token):
      {
        bool not;
        if(!`kyuushiki(not=, in=)) ret -1;
        if(not && !.cfg.IgnoreMostErrors){
          `lasterror = "timemodに != は使えません";
          ret -1;
        }
        token = `tokenizer(in=);
        if(.s.equ("-", token)){
          `lasterror = "マイナスが付くとエラーです";
          ret -1;
        }
        int val;
        if(!`integer2(val=, token, in=)) ret -1;
        if(val <= 0){
          `lasterror = "timemodのは0より大きくなければいけません";
          ret -1;
        }
        out .= ".v.setI(" .= obj .= "stVal.time%" .= ''val .= ")$";
        out .= '(';
        if(!`kyuushikiSuperDX(out=, in=, typ=, true)) ret -1;
        out .= ')';
      }
    cond .s.equ("alive", token):
      out .= obj .= "isAlive()";
      typ = 3;
    cond .s.equ("win", token):
      out .= obj .= "isWin()";
      typ = 3;
    cond .s.equ("winko", token):
      out .= obj .= "trWinKO()";
      typ = 3;
    cond .s.equ("wintime", token):
      out .= obj .= "trWinTime()";
      typ = 3;
    cond .s.equ("winperfect", token):
      out .= obj .= "trWinPerfect()";
      typ = 3;
    cond .s.equ("lose", token):
      out .= obj .= "isLose()";
      typ = 3;
    cond .s.equ("loseko", token):
      out .= obj .= "trLoseKO()";
      typ = 3;
    cond .s.equ("losetime", token):
      out .= obj .= "trLoseTime()";
      typ = 3;
    cond .s.equ("drawgame", token):
      out .= "`trDrawGame()";
      typ = 3;
    cond .s.equ("life", token):
      out .= obj .= "sysivar[.iLIFE]";
      typ = 2;
    cond .s.equ("p2life", token):
      out .= obj .= "trP2Life()";
      typ = 0;
    cond .s.equ("lifemax", token):
      out .= obj .= "sysivar[.iLIFEMAX]";
      typ = 2;
    cond .s.equ("power", token):
      out .= obj .= "getSharePower()";
      typ = 2;
    cond .s.equ("powermax", token):
      out .= obj .= "sysivar[.iPOWERMAX]";
      typ = 2;
    cond .s.equ("pos", token):
      token = `tokenizer(in=);
      branch{
      cond .s.equ("x", token):
        out .= '(' .= obj .= "sysfvar[.fX]-.com.cam.x)";
      cond .s.equ("y", token):
        out .= obj .= "sysfvar[.fY]";
      cond .s.equ("z", token):///////////////
        out .= "0.0";
      else:
        break, else;
      }
      typ = 1;
    cond .s.equ("screenpos", token):
      token = `tokenizer(in=);
      branch{
      cond .s.equ("x", token):
        out .=
          "((" .= obj .=
          "sysfvar[.fX]-(.com.cam.screenX+.com.CharGameLeft))*.com.cam.scale)";
      cond .s.equ("y", token):
        out .= "((" .= obj .= "sysfvar[.fY]-.com.cam.screenY)*.com.cam.scale)";
      else:
        break, else;
      }
      typ = 1;
    cond .s.equ("id", token):
      out .= obj .= "trId()";
      typ = 2;
    cond .s.equ("facing", token):
      out .= "(int)" .= obj .= "facing";
      typ = 2;
    cond .s.equ("hitcount", token):
      out .= obj .= "sysivar[.iHITCOUNT]";
      typ = 2;
    cond .s.equ("uniqhitcount", token):
      out .= obj .= "sysivar[.iUNIQHITCOUNT]";
      typ = 2;
    cond
      .s.equ("p2dist", token) || .s.equ("p2bodydist", token)
      || .s.equ("rootdist", token) || .s.equ("parentdist", token)
      :
      branch{
        bool r = token[0] == 'r';
        bool p = token[1] == 'a';
        bool b = token[2] == 'b';
        ^/char oldin = in;
        token = `tokenizer(in=);
      cond .s.equ("x", token):
        branch{
        cond r:
          out .= obj .= "trRootDistX()";
        cond p:
          out .= obj .= "trParentDistX()";
        cond b:
          out .= obj .= "trP2BodyDistX()";
        else:
          out .= obj .= "trP2DistX()";
        }
      cond .s.equ("y", token):
        branch{
        cond r:
          out .= obj .= "trRootDistY()";
        cond p:
          out .= obj .= "trParentDistY()";
        else:
          out .= obj .= "trP2DistY()";
        }
      cond .s.equ("z", token):
        out .= ".v.setF(0.0)";
      else:
        break, else;
      }
      typ = 0;
    cond .s.equ("vel", token):
      token = `tokenizer(in=);
      branch{
      cond .s.equ("x", token):
        out .= obj .= "sysfvar[.fVX]";
      cond .s.equ("y", token):
        out .= obj .= "sysfvar[.fVY]";
      cond .s.equ("z", token):
        out .= "0.0";
      else:
        break, else;
      }
      typ = 1;
    cond .s.equ("hitvel", token):
      token = `tokenizer(in=);
      branch{
      cond .s.equ("x", token):
        out .= obj .= "trHitVelX()";
      cond .s.equ("y", token):
        out .= obj .= "trHitVelY()";
      cond .s.equ("z", token):
        out .= "0.0";
      else:
        break, else;
      }
      typ = 1;
    cond .s.equ("command", token):
      if(!eqneq(out=, in=, typ=)<, [bool(){
        index fnd;
        if(!.s.equ(\", `tokenizer(in=)) || .s.find(\", in)=>fnd < 0){
          `lasterror = "コマンド名が"\""で囲まれていません";
          ret false;
        }
        token = in[0..fnd];
        in = in[fnd+1..-1];
        ^index ci = `cmdl[`playerno].cTable~get(token);
        if(#ci == 0){
          `lasterror = "コマンド"\" + token + \""は存在しません";
          ret false;
        }
        out .= obj .= "trCommand(" .= ''`playerno .= "," .= ''ci<> .= ")";
        ret true;
      }]) ret -1;
    cond
      .s.equ("name", token) || .s.equ("p1name", token)
      || .s.equ("p2name", token)
      || .s.equ("p3name", token) || .s.equ("p4name", token)
      || .s.equ("authorname", token)
      :
      if(!eqneq(out=, in=, typ=)<, [bool(){
        bool a = token[0] =='a';
        bool p = token[0] =='p';
        int pn = token[0] =='n' ? 1 : (int)(token[1]-'0');
        index fnd;
        if(!.s.equ(\", `tokenizer(in=)) || .s.find(\", in)=>fnd < 0){
          `lasterror = "名前が"\""で囲まれていません";
          ret false;
        }
        token = in[0..fnd];
        in = in[fnd+1..-1];
        branch{
        cond a:
          out .=  obj .= "trAuthor("\" .= .s.toLower(token) .= \"")";
        else:
          out .=
            obj .= "trPName(" .= ''pn .= ","\"
            .= .s.toLower(token) .= \"")";
        }
        ret true;
      }]) ret -1;
    cond .s.equ("const", token):
      if(!.s.equ("(", `tokenizer(in=))){
        `lasterror = token + "の次に'('がありません";
        ret -1;
      }
      token = `tokenizer(in=);
      out .= obj;
      branch{
      cond .s.equ("velocity.walk.fwd.x", token):
        out .= "sysfvar[.fWALK_FWD]";
        typ = 1;
      cond .s.equ("velocity.walk.back.x", token):
        out .= "sysfvar[.fWALK_BACK]";
        typ = 1;
      cond .s.equ("velocity.run.fwd.x", token):
        out .= "sysfvar[.fRUN_FWDX]";
        typ = 1;
      cond .s.equ("velocity.run.fwd.y", token):
        out .= "sysfvar[.fRUN_FWDY]";
        typ = 1;
      cond .s.equ("velocity.run.back.x", token):
        out .= "sysfvar[.fRUN_BACKX]";
        typ = 1;
      cond .s.equ("velocity.run.back.y", token):
        out .= "sysfvar[.fRUN_BACKY]";
        typ = 1;
      cond .s.equ("velocity.jump.y", token):
        out .= "sysfvar[.fJUMP_NEUY]";
        typ = 1;
      cond .s.equ("velocity.jump.neu.x", token):
        out .= "sysfvar[.fJUMP_NEUX]";
        typ = 1;
      cond .s.equ("velocity.jump.fwd.x", token):
        out .= "sysfvar[.fJUMP_FWD]";
        typ = 1;
      cond .s.equ("velocity.jump.back.x", token):
        out .= "sysfvar[.fJUMP_BACK]";
        typ = 1;
      cond .s.equ("velocity.airjump.y", token):
        out .= "sysfvar[.fAIRJUMP_NEUY]";
        typ = 1;
      cond .s.equ("velocity.airjump.neu.x", token):
        out .= "sysfvar[.fAIRJUMP_NEUX]";
        typ = 1;
      cond .s.equ("velocity.airjump.fwd.x", token):
        out .= "sysfvar[.fAIRJUMP_FWD]";
        typ = 1;
      cond .s.equ("velocity.airjump.back.x", token):
        out .= "sysfvar[.fAIRJUMP_BACK]";
        typ = 1;
      cond .s.equ("velocity.runjump.fwd.x", token):
        out .= "sysfvar[.fRUNJUMP_FWDX]";
        typ = 1;
      cond .s.equ("velocity.runjump.y", token):
        out .= "sysfvar[.fRUNJUMP_FWDY]";
        typ = 1;
      cond .s.equ("velocity.runjump.back.x", token):
        out .= "sysfvar[.fRUNJUMP_BACKX]";
        typ = 1;
      cond .s.equ("velocity.runjump.back.y", token):
        out .= "sysfvar[.fRUNJUMP_BACKY]";
        typ = 1;
      cond .s.equ("movement.yaccel", token):
        out .= "sysfvar[.fYACCEL]";
        typ = 1;
      cond .s.equ("movement.airjump.num", token):
        out .= "sysivar[.iAIRJUMP_NUM]";
        typ = 2;
      cond .s.equ("movement.airjump.height", token):
        out .= "sysivar[.iAIRJUMP_HEIGHT]";
        typ = 2;
      cond .s.equ("size.height", token):
        out .= "sysivar[.iHEIGHT]";
        typ = 2;
      cond .s.equ("size.air.front", token):
        out .= "sysivar[.iAIR_FRONT]";
        typ = 2;
      cond .s.equ("size.ground.front", token):
        out .= "sysivar[.iGROUND_FRONT]";
        typ = 2;
      cond .s.equ("size.ground.back", token):
        out .= "sysivar[.iGROUND_BACK]";
        typ = 2;
      cond .s.equ("size.head.pos.x", token):
        out .= "sysivar[.iHEAD_POSX]";
        typ = 2;
      cond .s.equ("size.head.pos.y", token):
        out .= "sysivar[.iHEAD_POSY]";
        typ = 2;
      cond .s.equ("size.air.back", token):
        out .= "sysivar[.iAIR_BACK]";
        typ = 2;
      cond .s.equ("size.xscale", token):
        out .= "sysfvar[.fXSCALE]";
        typ = 1;
      cond .s.equ("size.yscale", token):
        out .= "sysfvar[.fYSCALE]";
        typ = 1;
      cond .s.equ("data.life", token):
        out .= "sysivar[.iLIFEMAX2]";
        typ = 2;
      cond .s.equ("size.proj.doscale", token):
        out .= "sysivar[.iPROJ_DOSCALE]";
        typ = 2;
      cond .s.equ("size.shadowoffset", token):
        out .= "sysivar[.iSHADOWOFFSET]";
        typ = 2;
      cond .s.equ("data.power", token):
        out .= "sysivar[.iPOWERMAX2]";
        typ = 2;
      cond .s.equ("data.attack", token):
        out .= "sysivar[.iATTACK]";
        typ = 2;
      cond .s.equ("data.defence", token):
        out .= "sysivar[.iDEFENCE]";
        typ = 2;
      cond .s.equ("size.mid.pos.x", token):
        out .= "sysivar[.iMID_POSX]";
        typ = 2;
      cond .s.equ("size.mid.pos.y", token):
        out .= "sysivar[.iMID_POSY]";
        typ = 2;
      cond .s.equ("data.fall.defence_mul", token):
        out .= "sysfvar[.fFALL_DEFENCE_MUL]";
        typ = 1;
      cond .s.equ("data.liedown.time", token):
        out .= "sysivar[.iLIEDOWN_TIME]";
        typ = 2;
      cond .s.equ("data.airjuggle", token):
        out .= "sysivar[.iAIRJUGGLE]";
        typ = 2;
      cond .s.equ("data.sparkno", token):
        out .= "sysivar[.iSPARKNO]";
        typ = 2;
      cond .s.equ("data.guard.sparkno", token):
        out .= "sysivar[.iGUARD_SPARKNO]";
        typ = 2;
      cond .s.equ("data.ko.echo", token):
        out .= "sysivar[.iKO_ECHO]";
        typ = 2;
      cond .s.equ("data.intpersistindex", token):
        out .= "sysivar[.iINTPERSISTINDEX]";
        typ = 2;
      cond .s.equ("data.floatpersistindex", token):
        out .= "sysivar[.iFLOATPERSISTINDEX]";
        typ = 2;
      cond .s.equ("size.attack.dist", token):
        out .= "sysivar[.iATTACK_DIST]";
        typ = 2;
      cond .s.equ("size.proj.attack.dist", token):
        out .= "sysivar[.iPROJ_ATTACK_DIST]";
        typ = 2;
      cond .s.equ("size.draw.offset.x", token):
        out .= "sysivar[.iDRAW_OFFSETX]";
        typ = 2;
      cond .s.equ("size.draw.offset.y", token):
        out .= "sysivar[.iDRAW_OFFSETY]";
        typ = 2;
      cond .s.equ("movement.stand.friction", token):
        out .= "sysfvar[.fSTAND_FRICTION]";
        typ = 1;
      cond .s.equ("movement.crouch.friction", token):
        out .= "sysfvar[.fCROUCH_FRICTION]";
        typ = 1;
      cond .s.equ("size.z.width", token):
        out .= "sysivar[.iZ_WIDTH]";
        typ = 2;
      cond .s.equ("size.attack.z.width.front", token):
        out .= "sysivar[.iATTACK_Z_WIDTH_FRONT]";
        typ = 2;
      cond .s.equ("size.attack.z.width.back", token):
        out .= "sysivar[.iATTACK_Z_WIDTH_BACK]";
        typ = 2;
      cond .s.equ("velocity.air.gethit.groundrecover.x", token):
        out .= "sysfvar[.fAIR_GETHIT_GROUNDRECOVERX]";
        typ = 1;
      cond .s.equ("velocity.air.gethit.groundrecover.y", token):
        out .= "sysfvar[.fAIR_GETHIT_GROUNDRECOVERY]";
        typ = 1;
      cond .s.equ("velocity.air.gethit.airrecover.mul.x", token):
        out .= "sysfvar[.fAIR_GETHIT_AIRRECOVER_MULX]";
        typ = 1;
      cond .s.equ("velocity.air.gethit.airrecover.mul.y", token):
        out .= "sysfvar[.fAIR_GETHIT_AIRRECOVER_MULY]";
        typ = 1;
      cond .s.equ("velocity.air.gethit.airrecover.add.x", token):
        out .= "sysfvar[.fAIR_GETHIT_AIRRECOVER_ADDX]";
        typ = 1;
      cond .s.equ("velocity.air.gethit.airrecover.add.y", token):
        out .= "sysfvar[.fAIR_GETHIT_AIRRECOVER_ADDY]";
        typ = 1;
      cond .s.equ("velocity.air.gethit.airrecover.back", token):
        out .= "sysfvar[.fAIR_GETHIT_AIRRECOVER_BACK]";
        typ = 1;
      cond .s.equ("velocity.air.gethit.airrecover.fwd", token):
        out .= "sysfvar[.fAIR_GETHIT_AIRRECOVER_FWD]";
        typ = 1;
      cond .s.equ("velocity.air.gethit.airrecover.up", token):
        out .= "sysfvar[.fAIR_GETHIT_AIRRECOVER_UP]";
        typ = 1;
      cond .s.equ("velocity.air.gethit.airrecover.down", token):
        out .= "sysfvar[.fAIR_GETHIT_AIRRECOVER_DOWN]";
        typ = 1;
      cond .s.equ("velocity.walk.up.x", token):
        out .= "sysfvar[.fWALK_UP_X]";
        typ = 1;
      cond .s.equ("velocity.walk.down.x", token):
        out .= "sysfvar[.fWALK_DOWN_X]";
        typ = 1;
      cond .s.equ("velocity.run.up.x", token):
        out .= "sysfvar[.fRUN_UP_X]";
        typ = 1;
      cond .s.equ("velocity.run.up.y", token):
        out .= "sysfvar[.fRUN_UP_Y]";
        typ = 1;
      cond .s.equ("velocity.run.down.x", token):
        out .= "sysfvar[.fRUN_DOWN_X]";
        typ = 1;
      cond .s.equ("velocity.run.down.y", token):
        out .= "sysfvar[.fRUN_DOWN_Y]";
        typ = 1;
      cond .s.equ("velocity.jump.up.x", token):
        out .= "sysfvar[.fJUMP_UP_X]";
        typ = 1;
      cond .s.equ("velocity.jump.down.x", token):
        out .= "sysfvar[.fJUMP_DOWN_X]";
        typ = 1;
      cond .s.equ("velocity.runjump.up.x", token):
        out .= "sysfvar[.fRUNJUMP_UP_X]";
        typ = 1;
      cond .s.equ("velocity.runjump.down.x", token):
        out .= "sysfvar[.fRUNJUMP_DOWN_X]";
        typ = 1;
      cond .s.equ("velocity.airjump.up.x", token):
        out .= "sysfvar[.fAIRJUMP_UP_X]";
        typ = 1;
      cond .s.equ("velocity.airjump.down.x", token):
        out .= "sysfvar[.fAIRJUMP_DOWN_X]";
        typ = 1;
      cond .s.equ("movement.stand.friction.threshold", token):
        out .= "sysfvar[.fSTAND_FRICTION_THRESHOLD]";
        typ = 1;
      cond .s.equ("movement.crouch.friction.threshold", token):
        out .= "sysfvar[.fCROUCH_FRICTION_THRESHOLD]";
        typ = 1;
      cond .s.equ("movement.air.gethit.groundlevel", token):
        out .= "sysfvar[.fAIR_GETHIT_GROUNDLEVEL]";
        typ = 1;
      cond .s.equ("movement.air.gethit.groundrecover.ground.threshold", token):
        out .= "sysfvar[.fAIR_GETHIT_GROUNDRECOVER_GROUND_THRESHOLD]";
        typ = 1;
      cond .s.equ("movement.air.gethit.groundrecover.groundlevel", token):
        out .= "sysfvar[.fAIR_GETHIT_GROUNDRECOVER_GROUNDLEVEL]";
        typ = 1;
      cond .s.equ("movement.air.gethit.airrecover.threshold", token):
        out .= "sysfvar[.fAIR_GETHIT_AIRRECOVER_THRESHOLD]";
        typ = 1;
      cond .s.equ("movement.air.gethit.airrecover.yaccel", token):
        out .= "sysfvar[.fAIR_GETHIT_AIRRECOVER_YACCEL]";
        typ = 1;
      cond .s.equ("movement.air.gethit.trip.groundlevel", token):
        out .= "sysfvar[.fAIR_GETHIT_TRIP_GROUNDLEVEL]";
        typ = 1;
      cond .s.equ("movement.down.bounce.offset.x", token):
        out .= "sysfvar[.fDOWN_BOUNCE_OFFSETX]";
        typ = 1;
      cond .s.equ("movement.down.bounce.offset.y", token):
        out .= "sysfvar[.fDOWN_BOUNCE_OFFSETY]";
        typ = 1;
      cond .s.equ("movement.down.bounce.yaccel", token):
        out .= "sysfvar[.fDOWN_BOUNCE_YACCEL]";
        typ = 1;
      cond .s.equ("movement.down.bounce.groundlevel", token):
        out .= "sysfvar[.fDOWN_BOUNCE_GROUNDLEVEL]";
        typ = 1;
      cond .s.equ("movement.down.friction.threshold", token):
        out .= "sysfvar[.fDOWN_FRICTION_THRESHOLD]";
        typ = 1;
      else:
        `lasterror = token + "が不正です";
        ret -1;
      }
      `skipBlank(in=);
      if(#in == 0 || (!.cfg.IgnoreMostErrors && in[0] != ')')){
        `lasterror = ")がありません";
        ret -1;
      }
      in = in[1..-1];
    cond .s.equ("sysvar", token):
      if(var(obj, token, "SysIVar", out=, in=, 2)=>typ < 0) ret -1;
    cond .s.equ("sysfvar", token):
      if(var(obj, token, "SysFVar", out=, in=, 1)=>typ < 0) ret -1;
    cond .s.equ("var", token):
      if(var(obj, token, "IVar", out=, in=, 2)=>typ < 0) ret -1;
    cond .s.equ("fvar", token):
      if(var(obj, token, "FVar", out=, in=, 1)=>typ < 0) ret -1;
    cond .s.equ("animexist", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      `expCast(out=, 0, typ, temp);
      out .= '$' .= obj .= "trAnimExist(`id)";
      typ = 0;
    cond .s.equ("selfanimexist", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      `expCast(out=, 0, typ, temp);
      out .= '$' .= obj .= "trSelfAnimExist()";
      typ = 0;
    cond .s.equ("stateno", token):
      out .= obj .= "stVal.no";
      typ = 2;
    cond .s.equ("p2stateno", token):
      out .= obj .= "trP2StateNo()";
      typ = 0;
    cond .s.equ("prevstateno", token):
      out .= obj .= "stVal.prevno";
      typ = 2;
    cond .s.equ("statetype", token) || .s.equ("p2statetype", token):
      if(!eqneq2(out=, in=, typ=)<, [bool(%char out=){
        bool p2 = token[0] == 'p';
        ^/char sty;
        token = `tokenizer(in=);
        branch{
        cond #token > 0:
          switch(token[0]){
          case 's':
            sty = ".StTy::S";
          case 'c':
            sty = ".StTy::C";
          case 'a':
            sty = ".StTy::A";
          case 'l':
            sty = ".StTy::L";
          default:
            break, else;
          }
        else:
          `lasterror = token + "が無効な値です";
          ret false;
        }
        out .= obj .= (p2 ? "trP2StateType(" : "trStateType(") .= sty .= ")";
        if(p2) typ = 0;
        ret true;
      }]) ret -1;
    cond .s.equ("movetype", token) || .s.equ("p2movetype", token):
      if(!eqneq2(out=, in=, typ=)<, [bool(%char out=){
        bool p2 = token[0] == 'p';
        ^/char tmp;
        token = `tokenizer(in=);
        branch{
        cond #token > 0:
          switch(token[0]){
          case 'i':
            tmp = ".MovTy::I";
          case 'a':
            tmp = ".MovTy::A";
          case 'h':
            tmp = ".MovTy::H";
          default:
            break, else;
          }
        else:
          `lasterror = token + "が無効な値です";
          ret false;
        }
        out .= obj .= (p2 ? "trP2MoveType(" : "trMoveType(") .= tmp .= ")";
        if(p2) typ = 0;
        ret true;
      }]) ret -1;
    cond .s.equ("teammode", token):
      if(!eqneq(out=, in=, typ=)<, [bool(){
        ^/char pty;
        token = `tokenizer(in=);
        branch{
        cond .s.equ("single", token):
          pty = ".com.TeamMode::Single";
        cond .s.equ("simul", token):
          pty = ".com.TeamMode::Simul";
        cond .s.equ("turns", token):
          pty = ".com.TeamMode::Turns";
        else:
          `lasterror = token + "が無効な値です";
          ret false;
        }
        out .= obj .= "trTeamMode(" .= pty .= ")";
        ret true;
      }]) ret -1;
    cond .s.equ("gethitvar", token):
      if(!.s.equ("(", `tokenizer(in=))){
        `lasterror = token + "の次に'('がありません";
        ret -1;
      }
      token = `tokenizer(in=);
      branch{
      cond .s.equ("xveladd", token):
        out .= "0.0";////////////////////////////////////////
        typ = 1;
      cond .s.equ("yveladd", token):
        out .= "0.0";////////////////////////////////////////
        typ = 1;
      cond .s.equ("type", token):
        out .= "(int)0";
        typ = 2;
      cond .s.equ("animtype", token):
        out .= obj .= "gethitAnimtype()";
        typ = 2;
      cond .s.equ("airtype", token):
        out .= obj .= "stVal.hb.airtype";
        typ = 2;
      cond .s.equ("groundtype", token):
        out .= obj .= "stVal.hb.groundtype";
        typ = 2;
      cond .s.equ("damage", token):
        out .= obj .= "stVal.hb.damage";
        typ = 2;
      cond .s.equ("hitcount", token):
        out .= obj .= "stVal.hb.hitcount";
        typ = 2;
      cond .s.equ("fallcount", token):
        out .= obj .= "stVal.hb.fallcount";
        typ = 2;
      cond .s.equ("hitshaketime", token):
        out .= obj .= "stVal.hb.hitshaketime";
        typ = 2;
      cond .s.equ("hittime", token):
        out .= obj .= "stVal.hb.hittime";
        typ = 2;
      cond .s.equ("slidetime", token):
        out .= obj .= "stVal.hb.slidetime";
        typ = 2;
      cond .s.equ("ctrltime", token):
        out .= obj .= "stVal.hb.ctrltime";
        typ = 2;
      cond .s.equ("recovertime", token):
        out .= obj .= "sysivar[.iRECOVERTIME]";
        typ = 2;
      cond .s.equ("xoff", token):
        out .= obj .= "stVal.hb.xoff";
        typ = 1;
      cond .s.equ("yoff", token):
        out .= obj .= "stVal.hb.yoff";
        typ = 1;
      cond .s.equ("zoff", token):
        out .= "0.0";
        typ = 1;
      cond .s.equ("xvel", token):
        out .= obj .= "trHitXvel()";
        typ = 1;
      cond .s.equ("yvel", token):
        out .= obj .= "stVal.hb.yvel";
        typ = 1;
      cond .s.equ("yaccel", token):
        out .= obj .= "stVal.hb.getYaccel()";
        typ = 1;
      cond .s.equ("hitid", token) || .s.equ("chainid", token):
        out .= obj .= "trHitId()";
        typ = 2;
      cond .s.equ("guarded", token):
        out .= obj .= "stVal.hb.guarded";
        typ = 3;
      cond .s.equ("fall", token):
        out .= obj .= "stVal.hb.fallf";
        typ = 3;
      cond .s.equ("fall.damage", token):
        out .= obj .= "stVal.hb.fall.damage";
        typ = 2;
      cond .s.equ("fall.xvel", token):
        out .= obj .= "trFallXvel()";
        typ = 1;
      cond .s.equ("fall.yvel", token):
        out .= obj .= "stVal.hb.fall.yvelocity";
        typ = 1;
      cond .s.equ("fall.recover", token):
        out .= obj .= "stVal.hb.fall.recover";
        typ = 2;
      cond .s.equ("fall.time", token):
        out .= obj .= "stVal.fallTime";
        typ = 2;
      cond .s.equ("fall.recovertime", token):
        out .= obj .= "stVal.hb.fall.recovertime";
        typ = 2;
      cond .s.equ("fall.kill", token):
        out .= obj .= "stVal.hb.fall.kill";
        typ = 2;
      cond .s.equ("fall.envshake.time", token):
        out .= obj .= "stVal.hb.fall.envshake_time";
        typ = 2;
      cond .s.equ("fall.envshake.freq", token):
        out .= obj .= "stVal.hb.fall.envshake_freq";
        typ = 1;
      cond .s.equ("fall.envshake.ampl", token):
        out .= obj .= "stVal.hb.fall.envshake_ampl";
        typ = 2;
      cond .s.equ("fall.envshake.phase", token):
        out .= obj .= "stVal.hb.fall.envshake_phase";
        typ = 1;
      cond .s.equ("fall.envshake.dir", token):
        out .= "(int)0";
        typ = 2;
      cond .s.equ("isbound", token):
        out .= obj .= "isBound()";
        typ = 3;
      else:
        `lasterror = token + "が不正です";
        ret -1;
      }
      if(!`kakkotojiru(in=)) ret -1;
    cond .s.equ("hitdefattr", token):
      branch{
        ~$bool() f = [bool(){
          int flg;
          if(!`trgAttr(flg=, in=)) ret false;
          out .= obj .= "trHitDefAttr(" .= ''flg .= ")";
          ret true;
        }];
      cond `mver0 == 1:
        if(!eqneq(out=, in=, typ=, f)) ret -1;
      else:
        {
          bool not;
          if(!`kyuushiki(not=, in=)){
            if(!.cfg.IgnoreMostErrors) ret -1;
            out .= "(int)0";
            typ = 2;
            break, break;
          }
          if(not && !.cfg.IgnoreMostErrors){
            `lasterror = "旧バージョンのためhitdefattrに != は使えません";
            ret -1;
          }
          if(!f(::)) ret -1;
          typ = 3;
        }
      }
    cond
      .s.equ("numhelper", token) || .s.equ("numexplod", token)
      || .s.equ("numtarget", token) || .s.equ("numprojid", token)
      || .s.equ("ishelper", token)
      :
      {
        bool is = token[0] == 'i';
        bool h = token[3] == 'h';
        bool t = token[3] == 't';
        bool p = token[3] == 'p';
        ^/char oldin = in;
        branch{
        cond .s.equ("(", `tokenizer(in=)):
          in = oldin;
          if(!`typeExp!`expValue?(out=, in=, 0)) ret -1;
          out .= '$' .= obj;
          branch{
          cond is:
            out .= "trIsHelper()";
          cond h:
            out .= "trNumHelper()";
          cond t:
            out .= "trNumTarget()";
          cond p:
            out .= "trNumProjID()";
          else:
            out .= "trNumExplod()";
          }
        else:
          in = oldin;
          branch{
          cond is:
            out .= ".v.setI(-1)$" .= obj .= "trIsHelper()";
          cond h:
            out .= ".v.setI(-1)$" .= obj .= "trNumHelper()";
          cond t:
            out .= ".v.setI(-1)$" .= obj .= "trNumTarget()";
          cond p:
            `lasterror = "NumProjIDの引数がありません";
            ret -1;
          else:
            out .= ".v.setI(-1)$" .= obj .= "trNumExplod()";
          }
        }
        typ = 0;
      }
    cond .s.equ("noko", token):
      out .= ".gs(.gsNOKO)";
      typ = 3;
    cond .s.equ("active", token):
      out .= obj .= "isActive()";
      typ = 3;
    cond .s.equ("numenemy", token):
      out .= obj .= "trNumEnemy()";
      typ = 2;
    cond .s.equ("numpartner", token):
      out .= obj .= "trNumPartner()";
      typ = 2;
    cond .s.equ("projhittime", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      `expCast(out=, 0, typ, temp);
      out .='$' .= obj .= "trProjTime(.ProjContact::Hit)";
      typ = 0;
    cond .s.equ("projguardedtime", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      `expCast(out=, 0, typ, temp);
      out .= '$' .= obj .= "trProjTime(.ProjContact::Guarded)";
      typ = 0;
    cond .s.equ("projcontacttime", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      `expCast(out=, 0, typ, temp);
      out .= '$' .= obj .= "trProjContactTime()";
      typ = 0;
    cond .s.equ("projcanceltime", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      `expCast(out=, 0, typ, temp);
      out .= '$' .= obj .= "trProjTime(.ProjContact::Cancel)";
      typ = 0;
    cond
      .s.equ("projhit", token[0..7]) || .s.equ("projguarded", token[0..11])
      || .s.equ("projcontact", token[0..11])
      :
      {
        bool h = token[4] == 'h', g = token[4] == 'g';
        ^/char ptime =
          h ? "trProjTime(.ProjContact::Hit)"
          : (g ? "trProjTime(.ProjContact::Guarded)" : "trProjContactTime()");
        ^/char oldin;
        int id = .com.atonOF!int?(token[(h?7:11)..-1]);
        bool not;
        if(!`kyuushiki(not=, in=)) ret -1;
        if(not && !.cfg.IgnoreMostErrors){
          `lasterror = "!= は使えません";
          ret -1;
        }
        token = `tokenizer(in=);
        if(.s.equ("-", token)){
          `lasterror = "マイナスが付くとエラーです";
          ret -1;
        }
        int val;
        if(!`integer2(val=, token, in=)) ret -1;
        out .=
          "((" .= ''val .= "==0)^(.v.setI(" .= ''id .= ")$"
           .= obj .= ptime .= "$.v.toI()==0&&";
        if(!`kyuushikiSuperDX(out=, in=, typ=, false)) ret -1;
        out .= "))";
      }
    cond .s.equ("numproj", token):
      out .= obj .= "trNumProj()";
      typ = 2;
    cond .s.equ("hitpausetime", token):
      out .= obj .= "trHitPauseTime()";
      typ = 2;
    cond .s.equ("ctrl", token):
      out .= obj .= "canCtrl()";
      typ = 3;
    cond .s.equ("teamside", token):
      out .= "((int)(" .= obj .= "playerno&1)+1)";
      typ = 2;
    cond .s.equ("nokosnd", token):
      out .= ".gs(.gsNOKOSND)";
      typ = 3;
    cond .s.equ("frontedgedist", token):
      out .= obj .= "trFrontEdgeDist()";
      typ = 2;
    cond .s.equ("frontedgebodydist", token):
      out .= obj .= "trFrontEdgeBodyDist()";
      typ = 2;
    cond .s.equ("frontedge", token):
      out .= obj .= "trFrontEdge()";
      typ = 1;
    cond .s.equ("backedgedist", token):
      out .= obj .= "trBackEdgeDist()";
      typ = 2;
    cond .s.equ("backedgebodydist", token):
      out .= obj .= "trBackEdgeBodyDist()";
      typ = 2;
    cond .s.equ("backedge", token):
      out .= obj .= "trBackEdge()";
      typ = 1;
    cond .s.equ("leftedge", token):
      out .= obj .= "trLeftEdge()";
      typ = 1;
    cond .s.equ("rightedge", token):
      out .= obj .= "trRightEdge()";
      typ = 1;
    cond .s.equ("topedge", token):
      out .= obj .= "trTopEdge()";
      typ = 1;
    cond .s.equ("bottomedge", token):
      out .= obj .= "trBottomEdge()";
      typ = 1;
    cond .s.equ("camerapos", token):
      token = `tokenizer(in=);
      branch{
      cond .s.equ("x", token):
        out .= obj .= "trCameraPosX()";
      cond .s.equ("y", token):
        out .= obj .= "trCameraPosY()";
      else:
        break, else;
      }
      typ = 1;
    cond .s.equ("camerazoom", token):
      out .= obj .= "trCameraZoom()";
      typ = 1;
    cond .s.equ("palno", token):
      out .= obj .= "palno()";
      typ = 2;
    cond .s.equ("inguarddist", token):
      out .= obj .= "inguarddist";
      typ = 3;
    cond .s.equ("hitover", token):
      out .= obj .= "trHitOver()";
      typ = 3;
    cond .s.equ("hitshakeover", token):
      out .= obj .= "trHitShakeOver()";
      typ = 3;
    cond .s.equ("hitfall", token):
      out .= obj .= "isFall()";
      typ = 3;
    cond .s.equ("canrecover", token):
      out .= obj .= "trCanRecover()";
      typ = 3;
    cond .s.equ("roundsexisted", token):
      out .= obj .= "trRoundsExisted()";
      typ = 2;
    cond .s.equ("movecontact", token):
      out .= obj .= "trMoveContact()";
      typ = 2;
    cond .s.equ("movereversed", token):
      out .= obj .= "trMoveReversed()";
      typ = 2;
    cond .s.equ("movehit", token):
      out .= obj .= "trMoveHit()";
      typ = 2;
    cond .s.equ("moveguarded", token):
      out .= obj .= "trMoveGuarded()";
      typ = 2;
    cond .s.equ("roundstate", token):
      out .= obj .= "roundState()";
      typ = 2;
    cond .s.equ("ishometeam", token):
      out .= "((" .= obj .= "playerno&1)==.com.home)";
      typ = 3;
    cond .s.equ("ailevel", token):
      out .= obj .= "trAILevel()";
      typ = 2;
    cond .s.equ("const240p", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      `expCast(out=, 1, typ, temp);
      typ = 1;
    cond .s.equ("const480p", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      out .= '(';
      `expCast(out=, 1, typ, temp);
      out .= "/2.0)";
      typ = 1;
    cond .s.equ("const720p", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      out .= '(';
      `expCast(out=, 1, typ, temp);
      out .= "/4.0)";
      typ = 1;
    cond .s.equ("gamewidth", token):
      out .= obj .= "trGameWidth()";
      typ = 1;
    cond .s.equ("gameheight", token):
      out .= obj .= "trGameHeight()";
      typ = 1;
    cond .s.equ("screenwidth", token):
      out .= obj .= "trScreenWidth()";
      typ = 1;
    cond .s.equ("screenheight", token):
      out .= obj .= "trScreenHeight()";
      typ = 1;
    cond .s.equ("cond", token):
      out .= '(';
      if(!.s.equ("(", `tokenizer(in=))){
        `lasterror = token + "の次に'('がありません";
        ret -1;
      }
      {
        ^/char oldthis = `this;
        `this = obj;
        if(!`typeExp!`expBoolOr?(out=, in=, 3)) ret -1;
        out .= '?';
        if(!.s.equ(",", `tokenizer(in=))){
          `lasterror = token + "は引数が3個必要です";
          ret -1;
        }
        if(!`typeExp!`expBoolOr?(out=, in=, 0)) ret -1;
        out .= ':';
        if(!.s.equ(",", `tokenizer(in=))){
          `lasterror = token + "は引数が3個必要です";
          ret -1;
        }
        if(!`typeExp!`expBoolOr?(out=, in=, 0)) ret -1;
      break:
        `this = oldthis;
      }
      out .= ')';
      if(!`kakkotojiru(in=)) ret -1;
      typ = 0;
    cond .s.equ("stagevar", token):
      if(!.s.equ("(", `tokenizer(in=))){
        `lasterror = token + "の次に'('がありません";
        ret -1;
      }
      token = `tokenizer(in=);
      if(!`kakkotojiru(in=)) ret -1;
      branch{
        ^/char param;
      cond .s.equ("info.name", token):
        param = "nameLow";
      cond .s.equ("info.displayname", token):
        param = "displaynameLow";
      cond .s.equ("info.author", token):
        param = "authorLow";
      else:
        break, else;
      comm:
        if(!eqneq(out=, in=, typ=)<, [bool(){
          index fnd;
          if(!.s.equ(\", `tokenizer(in=)) || .s.find(\", in)=>fnd < 0){
            `lasterror = "名前が"\""で囲まれていません";
            ret false;
          }
          token = in[0..fnd];
          in = in[fnd+1..-1];
          out .= ".s.equ(.stg~".= param .= ","\" .= .s.toLower(token) .= \"")";
          ret true;
        }]) ret -1;
      }
    cond .s.equ("playerid", token):
      if(`oneArg(token, temp=, in=)=>typ < 0) ret -1;
      out .= obj .= "trPlayerID(";
      `expCast(out=, 2, typ, temp);
      if(!.s.equ(",")<, `tokenizer(in=)){
        `lasterror = "','がありません";
        ret -1;
      }
      temp.new(0);
      {
        ^/char rdObj = `rdObjName(obj);
        out .= ")$.rd([._t(" .= rdObj .= "=){";
        if(
          `expRedirectable(
            rdObj+".", `tokenizer(in=), temp=, in=)=>typ < 0) ret -1;
        `expCast(out=, 0, typ, temp);
        out .= ";}])";
      }
      typ = 0;
    cond
      .s.equ("enemy", token) || .s.equ("enemynear", token)
      || .s.equ("helper", token) || .s.equ("target", token)
      || .s.equ("partner", token)
      :
      branch{
        bool h = token[0] == 'h';
        bool t = token[0] == 't';
        bool p = token[0] == 'p';
        bool n = token[5] == 'n';
        token = `tokenizer(in=);
      cond .s.equ("(", token):
        branch{
        cond h:
          out .= obj .= "trHelper(";
        cond t:
          out .= obj .= "trTarget(";
        cond p:
          out .= obj .= "trPartner(";
        cond n:
          out .= obj .= "trEnemyNear(";
        else:
          out .= obj .= "trEnemy(";
        }
        if(!`typeExp!`expBoolOr?(out=, in=, 2)) ret -1;
        out .= ')';
        if(!`kakkotojiru(in=)) ret -1;
        if(!.s.equ(",")<, `tokenizer(in=)) else;
      cond .s.equ(",", token):
        branch{
        cond h:
          out .= obj .= "trHelper(-1)";
        cond t:
          out .= obj .= "trTarget(-1)";
        cond p:
          out .= obj .= "trPartner(0)";
        cond n:
          out .= obj .= "trEnemyNear(0)";
        else:
          out .= obj .= "trEnemy(0)";
        }
      else:
        `lasterror = "','がありません";
        ret -1;
      }
      {
        ^/char rdObj = `rdObjName(obj);
        out .= "$.rd([._t(" .= rdObj .= "=){";
        if(
          `expRedirectable(
            rdObj+".", `tokenizer(in=), temp=, in=)=>typ < 0) ret -1;
        `expCast(out=, 0, typ, temp);
        out .= ";}])";
      }
      typ = 0;
    cond .s.equ("root", token) || .s.equ("parent", token):
      out .= obj .= token[0] == 'r' ? "trRoot()" : "trParent()";
      if(!.s.equ(",")<, `tokenizer(in=)){
        `lasterror = ",がありません";
        ret -1;
      }
      {
        ^/char rdObj = `rdObjName(obj);
        out .= "$.rd([._t(" .= rdObj .= "=){";
        if(
          `expRedirectable(
            rdObj+".", `tokenizer(in=), temp=, in=)=>typ < 0) ret -1;
        `expCast(out=, 0, typ, temp);
        out .= ";}])";
      }
      typ = 0;
    cond .s.equ("standby", token):
      out .= obj .= "standby";
      typ = 3;
    cond
      .s.equ("=", token) || .s.equ("!=", token)
      || .s.equ(">", token) || .s.equ(">=", token)
      || .s.equ("<", token) || .s.equ("<=", token)
      || .s.equ("&", token) || .s.equ("&&", token)
      || .s.equ("^", token) || .s.equ("^^", token)
      || .s.equ("|", token) || .s.equ("||", token)
      || .s.equ("+", token)
      || .s.equ("*", token) || .s.equ("**", token)
      || .s.equ("/", token) || .s.equ("%", token)
      :
      if(!.cfg.IgnoreMostErrors || #`maeOp > 0) else;
      `maeOp = token;
      if(`expValue(out=, in=)=>typ < 0) ret -1;
    else:
      `lasterror = token + "が不正です";
      ret -1;
    }
    ret typ;
  }
  int expValue(%char out=, ^/char in=)
  {
    ret `expRedirectable(`this, `tokenizer(in=), out=, in=);
  }
  bool renzikuEnzansihaError(^/char in=){
    in = .s.trim(in);
    if(
      #in > 0 && .s.cMatch!char?(.enzansiMoji, in<>)
      || #in > 1 && in<> == '!' && in[1] == '='){
      `lasterror = `tokenizer(in=) + "が不正です";
      ret false;
    }
    ret true;
  }
  int expPostNot(%char out=, ^/char in=)
  {
    %char temp;
    int typ;
    if(`expValue(temp=, in=)=>typ < 0) ret -1;
    if(.cfg.IgnoreMostErrors) loop{
      ^/char oldin = in;
      if(!.s.equ(`tokenizer(in=), "!")){
        in = oldin;
        out .= temp;
        break, break;
      }
      `usiroOp = true;
      out .= '(';
      `expCast(out=, 3, typ, temp);
      typ = 3;
    do:
      out .= "^true";
      oldin = in;
    while .s.equ(`tokenizer(in=), "!"):
      in = oldin;
      out .= ')';
    }
    if(#`maeOp == 0) branch{
      ^/char oldin = in;
      ^/char token = `tokenizer(in=);
      int opp = `isOperator(token);
    cond opp == 0:
      if(!.cfg.IgnoreMostErrors || !`usiroOp && .s.equ(token, "(")){
        `lasterror = "演算子がありません";
        ret -1;
      }
      {
        ^/char tmp = in = oldin;
        %char dummy;
        if(!`typeExp!`expValue?(dummy=, in=, typ)) ret -1;
        if(!`usiroOp) break, else;
        oldin = in;
        token = `tokenizer(in=);
        if(`isOperator(token) <= 0){
          `lasterror = "演算子がありません";
          ret -1;
        }
        if(!`renzikuEnzansihaError(in=)) ret -1;
        in = token + tmp[0 .. #tmp - #oldin] + in;
      }
    else:
      if(opp > 0 && !`renzikuEnzansihaError(in=)) ret -1;
      in = oldin;
    }
    ret typ;
  }
  int expPow(%char out=, ^/char in=)
  {
    %char buf;
    int typ;
    if(`expPostNot(buf=, in=)=>typ < 0) ret -1;
    loop{
      ^/char oldin;
      ^/char token;
    do:
      if(!`operator(token=, in=, oldin=)) ret -1;
      branch{
        %char buf2, tmp;
        int typ2, t;
      cond .s.equ("**", token):
        if(`expPostNot(buf2=, in=)=>typ2 < 0) ret -1;
        t = .m.min!int?(typ, typ2);
        branch{
        cond t == 1:
          `nikouSub(tmp=, t, "((", typ, buf, ")**", typ2, buf2, ")");
        else:
          t = 0;
          `nikouSub(tmp=, 0, "`trPow(", typ, buf, "$.v,", typ2, buf2, "$.v)");
        }
        buf = tmp;
        typ = t;
      else:
        out .= buf;
        in = oldin;
        ret typ;
      }
    while true:}
    ret -1;
  }
  int expMldv(%char out=, ^/char in=)
  {
    %char buf;
    int typ;
    if(`expPow(buf=, in=)=>typ < 0) ret -1;
    loop{
      ^/char oldin;
      ^/char token;
    do:
      if(!`operator(token=, in=, oldin=)) ret -1;
      branch{
        %char buf2, tmp;
        int typ2, t;
      cond<mul> .s.equ("*", token):
      cond<div> .s.equ("/", token):
      cond<mod> .s.equ("%", token):
      else:
        out .= buf;
        in = oldin;
        ret typ;
      comm:
        if(`expPow(buf2=, in=)=>typ2 < 0) ret -1;
        t = .m.min!int?(typ, typ2);
      diff<mul>:
        branch{
        cond t >= 1:
          t = .m.min!int?(2, t);
          `nikouSub(tmp=, t, "(", typ, buf, "*", typ2, buf2, ")");
        else:
          `nikouSub(tmp=, t, "`trMul(", typ, buf, "$.v,", typ2, buf2, "$.v)");
        }
      diff<div>:
        t = 0;
        `nikouSub(tmp=, t, "`trDiv(", typ, buf, "$.v,", typ2, buf2, "$.v)");
      diff<mod>:
        t = 0;
        `nikouSub(tmp=, t, "`trMod(", typ, buf, "$.v,", typ2, buf2, "$.v)");
      comm:
        buf = tmp;
        typ = t;
      }
    while true:}
    ret -1;
  }
  int expAdsb(%char out=, ^/char in=)
  {
    %char buf;
    int typ;
    if(`expMldv(buf=, in=)=>typ < 0) ret -1;
    loop{
      ^/char oldin;
      ^/char token;
    do:
      if(!`operator(token=, in=, oldin=)) ret -1;
      branch{
        %char buf2, tmp;
        int typ2, t;
      cond<add> .s.equ("+", token):
      cond<sub> .s.equ("-", token):
      else:
        out .= buf;
        in = oldin;
        ret typ;
      comm:
        if(`expMldv(buf2=, in=)=>typ2 < 0) ret -1;
        t = .m.min!int?(typ, typ2);
      diff<add>:
        branch{
        cond t >= 1:
          t = .m.min!int?(2, t);
          `nikouSub(tmp=, t, "(", typ, buf, "+", typ2, buf2, ")");
        else:
          `nikouSub(tmp=, t, "`trAdd(", typ, buf, "$.v,", typ2, buf2, "$.v)");
        }
      diff<sub>:
        branch{
        cond t >= 1:
          t = .m.min!int?(2, t);
          `nikouSub(tmp=, t, "(", typ, buf, "-", typ2, buf2, ")");
        else:
          `nikouSub(tmp=, t, "`trSub(", typ, buf, "$.v,", typ2, buf2, "$.v)");
        }
      comm:
        buf = tmp;
        typ = t;
      }
    while true:}
    ret -1;
  }
  int expGrls(%char out=, ^/char in=)
  {
    %char buf;
    int typ;
    if(`expAdsb(buf=, in=)=>typ < 0) ret -1;
    loop{
      ^/char oldin;
      ^/char token;
    do:
      if(!`operator(token=, in=, oldin=)) ret -1;
      branch{
        %char buf2, tmp;
        int typ2, t;
      cond<gr> .s.equ(">", token):
      cond<gre> .s.equ(">=", token):
      cond<ls> .s.equ("<", token):
      cond<lse> .s.equ("<=", token):
      else:
        out .= buf;
        in = oldin;
        ret typ;
      comm:
        if(`expAdsb(buf2=, in=)=>typ2 < 0) ret -1;
        t = .m.min!int?(typ, typ2);
      diff<gr>:
        branch{
        cond t >= 1:
          t = .m.min!int?(2, t);
          `nikouSub(tmp=, t, "(", typ, buf, ">", typ2, buf2, ")");
        else:
          `nikouSub(
            tmp=, t, "`trGr(", typ, buf, "$.v,", typ2, buf2, "$.v)$.v.isT()");
        }
      diff<gre>:
        branch{
        cond t >= 1:
          t = .m.min!int?(2, t);
          `nikouSub(tmp=, t, "(", typ, buf, ">=", typ2, buf2, ")");
        else:
          `nikouSub(
            tmp=, t, "`trGrE(", typ, buf, "$.v,", typ2, buf2, "$.v)$.v.isT()");
        }
      diff<ls>:
        branch{
        cond t >= 1:
          t = .m.min!int?(2, t);
          `nikouSub(tmp=, t, "(", typ, buf, "<", typ2, buf2, ")");
        else:
          `nikouSub(
            tmp=, t, "`trLs(", typ, buf, "$.v,", typ2, buf2, "$.v)$.v.isT()");
        }
      diff<lse>:
        branch{
        cond t >= 1:
          t = .m.min!int?(2, t);
          `nikouSub(tmp=, t, "(", typ, buf, "<=", typ2, buf2, ")");
        else:
          `nikouSub(
            tmp=, t, "`trLsE(", typ, buf, "$.v,", typ2, buf2, "$.v)$.v.isT()");
        }
      comm:
        buf = tmp;
        typ = 3;
      }
    while true:}
    ret -1;
  }
  bool eNeSub(%char buf=, ^/char in=, bool not, int typ=)
  {
    branch{
      %char buf2, tmp;
      int typ2, t;
    cond<n> not:
    comm:
      if(`expGrls(buf2=, in=)=>typ2 < 0) ret false;
      t = .m.min!int?(typ, typ2);
    diff<n>:
      branch{
      cond t >= 1:
        `nikouSub(tmp=, t, "(", typ, buf, "!=", typ2, buf2, ")");
      else:
        `nikouSub(
          tmp=, t,
          "`trNEqu(", typ, buf, "$.v,", typ2, buf2, "$.v)$.v.isT()");
      }
    else:
      branch{
      cond t >= 1:
        `nikouSub(tmp=, t, "(", typ, buf, "==", typ2, buf2, ")");
      else:
        `nikouSub(
          tmp=, t, "`trEqu(", typ, buf, "$.v,", typ2, buf2, "$.v)$.v.isT()");
      }
    comm:
      buf = tmp;
      typ = 3;
    }
    ret true;
  }
  bool expRange(
    %char buf=, ^/char in=, ^/char oldoldin, bool openkaku, bool not, int typ=)
  {
    %char buf3;
    if(!`typeExp!`expBoolOr?(buf3=, in=, 0)) ret false;
    ^/char oldin = in;
    ^/char token = `tokenizer(in=);
    branch{
    cond .s.equ(",", token):
      {
        %char tmp;
        `expCast(tmp=, 0, typ, buf);
        buf = tmp;
      }
      buf .=
        "$`trRange(" .= (not ? ".v,true," : ".v,false,")
        .= (openkaku ? "true," : "false,") .= buf3 .= "$.v,";
      if(!`typeExp!`expBoolOr?(buf=, in=, 0)) ret false;
      buf .= "$.v,";
      token = `tokenizer(in=);
      branch{
      cond .s.equ("]", token):
        buf .= "true)$.v.isT()";
      cond .s.equ(")", token):
        buf .= "false)$.v.isT()";
      else:
        `lasterror = "]か)がありません";
        ret false;
      }
      typ = 3;
    cond openkaku:
      `lasterror = ",がありません";
      ret false;
    else:
      in = oldin;
      if(!`kakkotojiru(in=)) ret false;
      in = oldoldin;
      if(!`eNeSub(buf=, in=, not, typ=)) ret false;
    }
    ret true;
  }
  bool expEquSub(%char buf=, ^/char in=, bool not, int typ=)
  {
    branch{
      bool openkaku = false;
      ^/char oldin = in;
      ^/char token = `tokenizer(in=);
      if(`norange) else;
    cond .s.equ("[", token):
      openkaku = true;
    cond .s.equ("(", token):
    else:
      in = oldin;
      if(!`eNeSub(buf=, in=, not, typ=)) ret false;
      break;
    comm:
      if(!`expRange(buf=, in=, oldin, openkaku, not, typ=)) ret false;
    }
    ret true;
  }
  int expEqu(%char out=, ^/char in=)
  {
    %char buf;
    int typ;
    if(`expGrls(buf=, in=)=>typ < 0) ret -1;
    loop{
      ^/char oldin;
      ^/char token;
    do:
      if(!`operator(token=, in=, oldin=)) ret -1;
      branch{
        bool not;
      cond .s.equ("=", token):
        not = false;
      cond .s.equ("!=", token):
        not = true;
      else:
        out .= buf;
        in = oldin;
        ret typ;
      comm:
        if(!`expEquSub(buf=, in=, not, typ=)) ret -1;
      }
    while true:}
    ret -1;
  }
  int expAnd(%char out=, ^/char in=)
  {
    %char buf;
    int typ;
    if(`expEqu(buf=, in=)=>typ < 0) ret -1;
    loop{
      ^/char oldin;
      ^/char token;
    do:
      if(!`operator(token=, in=, oldin=)) ret -1;
      branch{
        %char buf2, tmp;
        int typ2;
      cond .s.equ("&", token):
        if(`expEqu(buf2=, in=)=>typ2 < 0) ret -1;
        `nikouSub(tmp=, 2, "(", typ, buf, "&", typ2, buf2, ")");
        buf = tmp;
        typ = 2;
      else:
        out .= buf;
        in = oldin;
        ret typ;
      }
    while true:}
    ret -1;
  }
  int expXor(%char out=, ^/char in=)
  {
    %char buf;
    int typ;
    if(`expAnd(buf=, in=)=>typ < 0) ret -1;
    loop{
      ^/char oldin;
      ^/char token;
    do:
      if(!`operator(token=, in=, oldin=)) ret -1;
      branch{
        %char buf2, tmp;
        int typ2;
      cond .s.equ("^", token):
        if(`expAnd(buf2=, in=)=>typ2 < 0) ret -1;
        `nikouSub(tmp=, 2, "(", typ, buf, "^", typ2, buf2, ")");
        buf = tmp;
        typ = 2;
      else:
        out .= buf;
        in = oldin;
        ret typ;
      }
    while true:}
    ret -1;
  }
  int expOr(%char out=, ^/char in=)
  {
    %char buf;
    int typ;
    if(`expXor(buf=, in=)=>typ < 0) ret -1;
    loop{
      ^/char oldin;
      ^/char token;
    do:
      if(!`operator(token=, in=, oldin=)) ret -1;
      branch{
        %char buf2, tmp;
        int typ2;
      cond .s.equ("|", token):
        if(`expXor(buf2=, in=)=>typ2 < 0) ret -1;
        `nikouSub(tmp=, 2, "(", typ, buf, "|", typ2, buf2, ")");
        buf = tmp;
        typ = 2;
      else:
        out .= buf;
        in = oldin;
        ret typ;
      }
    while true:}
    ret -1;
  }
  int expBoolAnd(%char out=, ^/char in=)
  {
    %char buf;
    int typ;
    if(`expOr(buf=, in=)=>typ < 0) ret -1;
    loop{
      ^/char oldin;
      ^/char token;
    do:
      if(!`operator(token=, in=, oldin=)) ret -1;
      branch{
        %char buf2, tmp;
        int typ2;
      cond .s.equ("&&", token):
        if(`expOr(buf2=, in=)=>typ2 < 0) ret -1;
        `nikouSub(tmp=, 3, "(", typ, buf, "&", typ2, buf2, ")");
        buf = tmp;
        typ = 3;
      else:
        out .= buf;
        in = oldin;
        ret typ;
      }
    while true:}
    ret -1;
  }
  int expBoolXor(%char out=, ^/char in=)
  {
    %char buf;
    int typ;
    if(`expBoolAnd(buf=, in=)=>typ < 0) ret -1;
    loop{
      ^/char oldin;
      ^/char token;
    do:
      if(!`operator(token=, in=, oldin=)) ret -1;
      branch{
        %char buf2, tmp;
        int typ2;
      cond .s.equ("^^", token):
        if(`expBoolAnd(buf2=, in=)=>typ2 < 0) ret -1;
        `nikouSub(tmp=, 3, "(", typ, buf, "^", typ2, buf2, ")");
        buf = tmp;
        typ = 3;
      else:
        out .= buf;
        in = oldin;
        ret typ;
      }
    while true:}
    ret -1;
  }
  int expBoolOr(%char out=, ^/char in=)
  {
    ^/char oldMaeOp = `maeOp;
    `maeOp = "";
    %char buf;
    int typ;
    if(`expBoolXor(buf=, in=)=>typ < 0) ret -1;
    loop{
      ^/char oldin;
      ^/char token;
    do:
      if(!`operator(token=, in=, oldin=)) ret -1;
      branch{
        %char buf2, tmp;
        int typ2;
      cond .s.equ("||", token):
        if(`expBoolXor(buf2=, in=)=>typ2 < 0) ret -1;
        `nikouSub(tmp=, 3, "(", typ, buf, "|", typ2, buf2, ")");
        buf = tmp;
        typ = 3;
      else:
        out .= buf;
        in = oldin;
        break, break;
      }
    while true:}
    if(#`maeOp > 0){
      `lasterror = `maeOp + "が不正です";
      ret -1;
    }
    `maeOp = oldMaeOp;
    ret typ;
  }
  void nikouSub(
    %char out=, int typ,
    ^/char pre, int lt, ^/char lv, ^/char mid, int rt, ^/char rv, ^/char end)
  {
    out .= pre;
    `expCast(out=, typ, lt, lv);
    out .= mid;
    `expCast(out=, typ, rt, rv);
    out .= end;
  }
  int expression(%char out=, ^/char in=)
  {
    int typ;
    if(`expBoolOr(out=, in=)=>typ < 0) ret -1;
    ret typ;
  }
  void expCast(%char out=, int typ, int expType, ^/char exp)
  {
    branch{
    cond typ == 0:
      branch{
      cond expType == 0:
        out .= exp;
      cond expType == 1:
        out .= ".v.setF(" .= exp .= ')';
      cond expType == 2:
        out .= ".v.setI(" .= exp .= ')';
      cond expType == 3:
        out .= ".v.setB(" .= exp .= ')';
      }
    cond typ == 1:
      branch{
      cond expType == 0:
        out .= exp .= "$.v.toF()";
      cond expType == 1:
        out .= exp;
      else:
        out .= "(float)(" .= exp .= ')';
      }
    cond typ == 2:
      branch{
      cond expType == 0:
        out .= exp .= "$.v.toI()";
      cond expType == 2:
        out .= exp;
      else:
        out .= "(int)(" .= exp .= ')';
      }
    cond typ == 3:
      branch{
      cond expType == 0:
        out .= exp .= "$.v.isT()";
      cond expType == 1:
        out .= '(' .= exp .= "!=0.0)";
      cond expType == 2:
        out .= '(' .= exp .= "!=0)";
      cond expType == 3:
        out .= exp;
      }
    }
  }
  bool typeExp<exp_t>(%char out=, ^/char in=, int typ)
  {
    %char temp;
    int et;
    if(exp_t(temp=, in=)=>et < 0) ret false;
    `expCast(out=, typ, et, temp);
    ret true;
  }
  bool argExpression(%char out=, ^/char in=, ^/char bef, ^/char aft, int typ)
  {
    out .= bef;
    `this = "`";
    if(!`typeExp!`expression?(out=, in=, typ)) ret false;
    ^/char oldin = in;
    ^/char token = `tokenizer(in=);
    if(#token > 0) branch{
    cond .s.equ(token, ","):
      if(#`tokenizer(in=) > 0) in = oldin;
    else:
      `lasterror = token + "が不正です";
      ret false;
    }
    out .= aft;
    ret true;
  }
  bool fullExpression(%char out=, ^/char in=, ^/char bef, ^/char aft, int typ)
  {
    out .= bef;
    `this = "`";
    if(!`typeExp!`expression?(out=, in=, typ)) ret false;
    ^/char token = `tokenizer(in=);
    if(#token > 0){
      `lasterror = token + "が不正です";
      ret false;
    }
    out .= aft;
    ret true;
  }
  bool parse<func_t>(%^/char lines, index i=, ^/char sec)
  {:<-
    bool atodeyaru<f_t>(&.tbl.NameTable!^/char? am=)
    {
      switch(`state.ctrlList[-1].typ){
      case .CtrlTy::ChangeState, .CtrlTy::SelfState:
        if(!`changeState(am=)) ret false;
      case .CtrlTy::ChangeAnim, .CtrlTy::ChangeAnim2:
        if(!`changeAnim(am=)) ret false;
      case
        .CtrlTy::PosSet, .CtrlTy::PosAdd,
        .CtrlTy::VelSet, .CtrlTy::VelAdd, .CtrlTy::VelMul
        :
        if(!`posvelSet(am=)) ret false;
      case
        .CtrlTy::VarSet, .CtrlTy::VarAdd,
        .CtrlTy::ParentVarSet, .CtrlTy::ParentVarAdd
        :
        if(!`varSet(am=)) ret false;
      case .CtrlTy::VarRangeSet:
        if(!`varRangeSet(am=)) ret false;
      case .CtrlTy::VarRandom:
        if(!`varRandom(am=)) ret false;
      case .CtrlTy::Turn:
        if(!`turn(am=)) ret false;
      case .CtrlTy::CtrlSet:
        if(!`ctrlSet(am=)) ret false;
      case .CtrlTy::StateTypeSet:
        if(!`stateTypeSet(am=)) ret false;
      case .CtrlTy::SprPriority:
        if(!`sprPriority(am=)) ret false;
      case .CtrlTy::HitDef, .CtrlTy::Projectile, .CtrlTy::ReversalDef:
        if(!`hitDef(am=)) ret false;
      case .CtrlTy::AttackDist:
        if(!`attackDist(am=)) ret false;
      case .CtrlTy::HitOverride:
        if(!`hitOverride(am=)) ret false;
      case .CtrlTy::Pause:
        if(!`pause(am=)) ret false;
      case .CtrlTy::SuperPause:
        if(!`superPause(am=)) ret false;
      case .CtrlTy::LifeAdd:
        if(!`lifeAdd(am=)) ret false;
      case .CtrlTy::LifeSet:
        if(!`lifeSet(am=)) ret false;
      case .CtrlTy::PowerAdd:
        if(!`powerAdd(am=)) ret false;
      case .CtrlTy::PowerSet:
        if(!`powerSet(am=)) ret false;
      case .CtrlTy::TargetLifeAdd:
        if(!`targetLifeAdd(am=)) ret false;
      case .CtrlTy::TargetBind, .CtrlTy::BindToTarget:
        if(!`targetBind(am=)) ret false;
      case .CtrlTy::TargetState:
        if(!`targetState(am=)) ret false;
      case .CtrlTy::TargetVelSet, .CtrlTy::TargetVelAdd:
        if(!`targetVelSet(am=)) ret false;
      case .CtrlTy::TargetFacing:
        if(!`targetFacing(am=)) ret false;
      case .CtrlTy::TargetPowerAdd:
        if(!`targetPowerAdd(am=)) ret false;
      case .CtrlTy::TargetDrop:
        if(!`targetDrop(am=)) ret false;
      case .CtrlTy::HitBy, .CtrlTy::NotHitBy:
        if(!`hitBy(am=)) ret false;
      case .CtrlTy::AttackMulSet:
        if(!`attackMulSet(am=)) ret false;
      case .CtrlTy::DefenceMulSet:
        if(!`defenceMulSet(am=)) ret false;
      case .CtrlTy::MoveHitReset:
        if(!`moveHitReset(am=)) ret false;
      case .CtrlTy::AssertSpecial:
        if(!`assertSpecial(am=)) ret false;
      case .CtrlTy::PosFreeze:
        if(!`posFreeze(am=)) ret false;
      case .CtrlTy::PlayerPush:
        if(!`playerPush(am=)) ret false;
      case .CtrlTy::Gravity:
        if(!`gravity(am=)) ret false;
      case .CtrlTy::BindToParent, .CtrlTy::BindToRoot:
        if(!`bindTo(am=)) ret false;
      case .CtrlTy::Helper:
        if(!`helper(am=)) ret false;
      case .CtrlTy::DestroySelf:
        if(!`destroySelf(am=)) ret false;
      case .CtrlTy::Explod, .CtrlTy::GameMakeAnim, .CtrlTy::ModifyExplod:
        if(!`explod(am=)) ret false;
      case .CtrlTy::ExplodBindTime:
        if(!`explodBindTime(am=)) ret false;
      case .CtrlTy::RemoveExplod:
        if(!`removeExplod(am=)) ret false;
      case .CtrlTy::AfterImage:
        if(!`afterImage(am=)) ret false;
      case .CtrlTy::AfterImageTime:
        if(!`afterImageTime(am=)) ret false;
      case .CtrlTy::MakeDust:
        if(!`makeDust(am=)) ret false;
      case .CtrlTy::AngleDraw:
        if(!`angleDraw(am=)) ret false;
      case .CtrlTy::AngleAdd, .CtrlTy::AngleMul, .CtrlTy::AngleSet:
        if(!`angleSet(am=)) ret false;
      case .CtrlTy::PalFX, .CtrlTy::AllPalFX, .CtrlTy::BGPalFX:
        if(!`palFX(am=)) ret false;
      case .CtrlTy::Trans:
        if(!`trans(am=)) ret false;
      case .CtrlTy::Offset:
        if(!`offset(am=)) ret false;
      case .CtrlTy::HitVelSet:
        if(!`hitVelSet(am=)) ret false;
      case .CtrlTy::HitFallSet:
        if(!`hitFallSet(am=)) ret false;
      case .CtrlTy::HitFallVel:
        if(!`hitFallVel(am=)) ret false;
      case .CtrlTy::HitFallDamage:
        if(!`hitFallDamage(am=)) ret false;
      case .CtrlTy::FallEnvShake:
        if(!`fallEnvShake(am=)) ret false;
      case .CtrlTy::EnvColor:
        if(!`envColor(am=)) ret false;
      case .CtrlTy::EnvShake:
        if(!`envShake(am=)) ret false;
      case .CtrlTy::Width:
        if(!`width(am=)) ret false;
      case .CtrlTy::ScreenBound:
        if(!`screenBound(am=)) ret false;
      case .CtrlTy::HitAdd:
        if(!`hitAdd(am=)) ret false;
      case .CtrlTy::PlaySnd:
        if(!`playSnd(am=)) ret false;
      case .CtrlTy::StopSnd:
        if(!`stopSnd(am=)) ret false;
      case .CtrlTy::SndPan:
        if(!`sndPan(am=)) ret false;
      case .CtrlTy::DisplayToClipboard, .CtrlTy::AppendToClipboard:
        if(!`displayToClipboard(am=)) ret false;
      case .CtrlTy::ClearClipboard:
        if(!`clearClipboard(am=)) ret false;
      case .CtrlTy::TagIn:
        if(!`tagIn(am=)) ret false;
      case .CtrlTy::TagOut:
        if(!`tagOut(am=)) ret false;
      case .CtrlTy::RemapPal:
        if(!`remapPal(am=)) ret false;
      case .CtrlTy::Zoom:
        if(!`zoom(am=)) ret false;
      default:
        {
          bool error = false;
          am.forEach([void(^/char name, ^^/char data){
            if(error) ret;
            error = !f_t("", name, data<>);
          }]);
          if(error) ret false;
        }
      }
      ret true;
    }
    &.tbl.NameTable!^/char? atomawasi;
    loop{
      index f;
      ^/char line;
      &.tbl.NameTable!int? tbl;
      bool typedeta = false;
      while;
    do:
      if(#lines[i] > 0 && lines[i][0] == '['){
        i--;
        break, break;
      }
      line = .s.trim(lines[i][0 .. .s.find(";", lines[i])]);
      branch{
        ^/char name, data;
      cond #line >= 3 && .s.equ(.s.toLower(line[0..3]), "var"):
        name = .s.toLower(line[0..3]);
        data = line;
      cond #line >= 4 && .s.equ(.s.toLower(line[0..4]), "fvar"):
        name = .s.toLower(line[0..4]);
        data = line;
      cond #line >= 6 && .s.equ(.s.toLower(line[0..6]), "sysvar"):
        name = .s.toLower(line[0..6]);
        data = line;
      cond #line >= 7 && .s.equ(.s.toLower(line[0..7]), "sysfvar"):
        name = .s.toLower(line[0..7]);
        data = line;
      else:
        name = .s.toLower(line[0 .. .s.cFind("= "\t, line)]);
        if(#name == #line) break;
        f = .s.find("=", line);
        data = f < 0 ? "" : .s.trim(line[f+1..-1]);
      comm:
        {
          bool foo = true;
          if(!.s.equ(name[0..7], "trigger")){
            tbl.operate(name)<, [void(^int d=){
              if(#d > 0){
                foo = false;
                ret;
              }
              d.new(1);
            }];
          }
          if(!foo){
            if(.cfg.IgnoreMostErrors) break, break;
            `lasterror = name + "が重複しています";
            ret false;
          }
          switch(typeid(func_t)){
          case typeid(`stateBulid:<-state):
            branch{
            cond .s.equ(name, "type"):
              typedeta = true;
            cond
              .s.equ(name[0..7], "trigger")
              || .s.equ(name, "persistent") || .s.equ(name, "ignorehitpause")
              :
            else:
              atomawasi.set(name, ?data);
              break;
            comm:
              if(!func_t(sec, name, data)) ret false;
            }
          case typeid(`stateBulid:<-statedef):
            atomawasi.set(name, ?data);
          default:
            if(!func_t(sec, name, data)) ret false;
          }
        }
      }
    continue:
      i++;
    while i < #lines:}
    if(typeid(func_t) == typeid(`stateBulid:<-statedef)){
      ret `stateDef(atomawasi=);
    }
    ret
      typeid(func_t) != typeid(`stateBulid:<-state)
      || atodeyaru!func_t?(atomawasi=);
  }
  bool stateParam(
    &.tbl.NameTable!^/char? param=, ^/char name, ~`paraF_t f)
  {
    ^^/char data;
    if(#(data = param.get(name)) > 0){
      `errorexp = data<>;
      if(!f(:data<>=:)){
        `lasterror = name + ": " + `lasterror;
        ret false;
      }
      `errorexp = "";
      data.new(0);
      param.set(name, data);
    }
    ret true;
  }
  bool stateSec(&.tbl.NameTable!^/char? param=, ~$bool() f)
  {
    if(!f(::)) ret false;
    if(!.cfg.IgnoreMostErrors){
      %char buf;
      param.forEach([void(^/char name, ^^/char data){
        if(#buf > 0) buf .= ", ";
        buf .= name;
      }]);
      if(#buf > 0){
        `lasterror = (buf .= "は無効なキー名です");
        ret false;
      }
    }
    ret true;
  }
  bool stateDef(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      if(!`stateParam(param=, "type", [`paraF_t(data=){
        if(#data == 0){
          `lasterror = "値が指定されていません";
          ret false;
        }
        switch(.s.toLowerChar(data[0])){
        case 's':
          `state.typ = .chr.StTy::S;
        case 'c':
          `state.typ = .chr.StTy::C;
        case 'a':
          `state.typ = .chr.StTy::A;
        case 'l':
          `state.typ = .chr.StTy::L;
        case 'u':
          `state.typ = .chr.StTy::U;
        default:
          `lasterror = data + "が無効な値です";
          ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "movetype", [`paraF_t(data=){
        if(#data == 0){
          `lasterror = "値が指定されていません";
          ret false;
        }
        switch(.s.toLowerChar(data[0])){
        case 'i':
          `state.mov = .chr.MovTy::I;
        case 'a':
          `state.mov = .chr.MovTy::A;
        case 'h':
          `state.mov = .chr.MovTy::H;
        case 'u':
          `state.mov = .chr.MovTy::U;
        default:
          `lasterror = data + "が無効な値です";
          ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "physics", [`paraF_t(data=){
        if(#data == 0){
          `lasterror = "値が指定されていません";
          ret false;
        }
        switch(.s.toLowerChar(data[0])){
        case 's':
          `state.phy = .chr.StTy::S;
        case 'c':
          `state.phy = .chr.StTy::C;
        case 'a':
          `state.phy = .chr.StTy::A;
        case 'n':
          `state.phy = .chr.StTy::N;
        case 'u':
          `state.phy = .chr.StTy::U;
        default:
          `lasterror = data + "が無効な値です";
          ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "hitcountpersist", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.deftask=, data=, "if(!(",
            "))`clearHitCount();", 3)) ret false;
        `state.hitcountpersist = 1;
        ret true;
      }])) ret false;
      if(`state.hitcountpersist == 0) `state.deftask .= "`clearHitCount();";
      if(!`stateParam(param=, "movehitpersist", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.deftask=, data=, "if(!(",
            "))`clearMoveHit();", 3)) ret false;
        `state.movehitpersist = 1;
        ret true;
      }])) ret false;
      if(`state.movehitpersist == 0) `state.deftask .= "`clearMoveHit();";
      if(!`stateParam(param=, "hitdefpersist", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.deftask=, data=, "if(!(",
            "))`clearHitDef();", 3)) ret false;
        `state.hitdefpersist = 1;
        ret true;
      }])) ret false;
      if(`state.hitdefpersist == 0) `state.deftask .= "`clearHitDef();";
      if(!`stateParam(param=, "sprpriority", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.deftask=, data=, "`sprpriority=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "facep2", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.deftask=, data=, "if(",
            "&&`trP2DistX()$.v.toF()<0.0)"
            "`setFacing(-`facing);", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "juggle", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.deftask=, data=, "`stVal.juggle=", ";", 2)) ret false;
        `state.juggle = 1;
        ret true;
      }])) ret false;
      if(`state.juggle == 0) `state.deftask .= "`stVal.juggle=0;";
      if(!`stateParam(param=, "velset", [`paraF_t(data=){
        if(
          !`argExpression(
            `state.deftask=, data=, "`setXV(", ");", 1)) ret false;
        if(.s.equ(",", `tokenizer(data=))){
          if(
            !`argExpression(
              `state.deftask=, data=, "`setYV(", ");", 1)) ret false;
          if(.s.equ(",", `tokenizer(data=))){
            if(
              !`fullExpression(
                `state.deftask=, data=, "", ";", 1)) ret false;
          }
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "anim", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.deftask=, data=, "`trChangeAnim(", ");", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "ctrl", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.deftask=, data=, "`setCtrl(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "poweradd", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.deftask=, data=, "`addPower(", ");", 2)) ret false;
        ret true;
      }])) ret false;
      ret true;
    }]);
  }
  bool changeState(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "int v=.com.IERR,a=-1,c=-1;";
      bool value = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        value = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "v=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!value){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      if(!`stateParam(param=, "ctrl", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "c=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "anim", [`paraF_t(data=){
        %char buf;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "a=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      branch{
      cond `state.ctrlList[-1].typ == .CtrlTy::SelfState:
        `state.ctrlList[-1].task .= "`trSelfState(v,a,c);";
      else:
        `state.ctrlList[-1].task .= "`trChangeState(v,a,c);";
      }
      ret true;
    }]);
  }
  bool changeAnim(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      ^/char elem;
      if(!`stateParam(param=, "elem", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "int e=", ";", 2)) ret false;
        elem = "`setAnimElem(e);";
        ret true;
      }])) ret false;
      bool value = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        value = true;
        `state.ctrlList[-1].task .=
          `state.ctrlList[-1].typ == .CtrlTy::ChangeAnim2
          ? "`trChangeAnim2" : "`trChangeAnim";
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "(.m.max!int?(0,", "));", 2)) ret false;
        ret true;
      }])) ret false;
      if(!value){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      `state.ctrlList[-1].task .= elem;
      ret true;
    }]);
  }
  bool posvelSet(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      if(!`stateParam(param=, "x", [`paraF_t(data=){
        switch(`state.ctrlList[-1].typ){
        case .CtrlTy::PosSet:
          `state.ctrlList[-1].task .= "`setX(";
        case .CtrlTy::PosAdd:
          `state.ctrlList[-1].task .= "`addX(";
        case .CtrlTy::VelSet:
          `state.ctrlList[-1].task .= "`setXV(";
        case .CtrlTy::VelAdd:
          `state.ctrlList[-1].task .= "`addXV(";
        case .CtrlTy::VelMul:
          `state.ctrlList[-1].task .= "`mulXV(";
        }
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            `state.ctrlList[-1].typ == .CtrlTy::PosSet ? ".com.cam.x+" : "",
            ");", 1))
        {
          ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "y", [`paraF_t(data=){
        switch(`state.ctrlList[-1].typ){
        case .CtrlTy::PosSet:
          `state.ctrlList[-1].task .= "`setY(";
        case .CtrlTy::PosAdd:
          `state.ctrlList[-1].task .= "`addY(";
        case .CtrlTy::VelSet:
          `state.ctrlList[-1].task .= "`setYV(";
        case .CtrlTy::VelAdd:
          `state.ctrlList[-1].task .= "`addYV(";
        case .CtrlTy::VelMul:
          `state.ctrlList[-1].task .= "`mulYV(";
        }
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "", ");", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "z", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "", ";", 1)) ret false;
        ret true;
      }])) ret false;
      ret true;
    }]);
  }
  bool varSet(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool par =
        `state.ctrlList[-1].typ == .CtrlTy::ParentVarSet
        || `state.ctrlList[-1].typ == .CtrlTy::ParentVarAdd;
      bool add =
        `state.ctrlList[-1].typ == .CtrlTy::VarAdd
        || `state.ctrlList[-1].typ == .CtrlTy::ParentVarAdd;
      if(par){
        `state.ctrlList[-1].task .= "^`self p=`trParent()$.c;if(#p==0)ret;";
      }
      bool v = false, fv = false, value = false;
      ^/char valexp;
      %char varexp;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        value = true;
        valexp = data;
        ret true;
      }]))ret false;
      if(value && !`stateParam(param=, "v", [`paraF_t(data=){
        v = true;
        ret `fullExpression(varexp=, data=, "", "", 2);
      }])) ret false;
      if(value && !v && !`stateParam(param=, "fv", [`paraF_t(data=){
        fv = true;
        ret `fullExpression(varexp=, data=, "", "", 2);
      }])) ret false;
      if((v || fv) && value){
        `state.ctrlList[-1].task .=
          (par ? "p~" : "`") .= (
            v ? (add ? "trAddIVar(" : "trSetIVar(")
            : (add ? "trAddFVar(" : "trSetFVar("))
          .= varexp .= ',';
        `errorexp = valexp;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, valexp=, "", "", v ? 2 : 1)) ret false;
        `errorexp = "";
        `state.ctrlList[-1].task.= ");";
        ret true;
      }
      v = fv = false;
      bool sys = false;
      ~$bool(^/char=) set = [bool(^/char data=){
        data = .s.trim(data);
        if(data[0] != '('){
          `lasterror = "'('がありません";
          ret false;
        }
        `state.ctrlList[-1].task .=
          (par ? "p~" : "`") .= (
            sys ? (
              v ? (add ? "trAddSysIVar(" : "trSetSysIVar(")
              : (add ? "trAddSysFVar(" : "trSetSysFVar("))
            : (
              v ? (add ? "trAddIVar(" : "trSetIVar(")
              : (add ? "trAddFVar(" : "trSetFVar(")));
        if(
          !`typeExp!`expValue?(
            `state.ctrlList[-1].task=, data=, 2)) ret false;
        `state.ctrlList[-1].task .= ',';
        index f = .s.find("=", data);
        if(f < 0){
          `lasterror = "'='がありません";
          ret false;
        }
        data = data[f+1..-1];
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "", "", v ? 2 : 1)) ret false;
        `state.ctrlList[-1].task.= ");";
        ret true;
      }];
      if(!value && !`stateParam(param=, "var", [`paraF_t(data=){
        if(data[0] != 'v'){
          `lasterror = data[0..3] + "の'v'が小文字でありません";
          ret false;
        }
        data = data[3..-1];
        value = true;
        v = true;
        ret set(:data=:);
      }])) ret false;
      if(!value && !`stateParam(param=, "fvar", [`paraF_t(data=){
        if(!par && data[0] != 'f'){
          `lasterror = data[0..4] + "の'f'が小文字でありません";
          ret false;
        }
        data = data[4..-1];
        value = true;
        fv = true;
        ret set(:data=:);
      }])) ret false;
      if(!value && !`stateParam(param=, "sysvar", [`paraF_t(data=){
        if(data[3] != 'v'){
          `lasterror = data[0..6] + "の'v'が小文字でありません";
          ret false;
        }
        data = data[6..-1];
        value = true;
        v = true;
        sys = true;
        ret set(:data=:);
      }])) ret false;
      if(!value && !`stateParam(param=, "sysfvar", [`paraF_t(data=){
        data = data[7..-1];
        value = true;
        fv = true;
        sys = true;
        ret set(:data=:);
      }])) ret false;
      if(!value){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      ret true;
    }]);
  }
  bool varRangeSet(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      ^/char fir, las, val, fval;
      if(!`stateParam(param=, "first", [`paraF_t(data=){
        %char buf;
        if(!`fullExpression(buf=, data=, "", ",", 2)) ret false;
        fir = buf;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "last", [`paraF_t(data=){
        %char buf;
        if(!`fullExpression(buf=, data=, "", ",", 2)) ret false;
        las = buf;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        %char buf;
        if(!`fullExpression(buf=, data=, "", ");", 2)) ret false;
        val = buf;
        ret true;
      }])) ret false;
      if(#val == 0 && !`stateParam(param=, "fvalue", [`paraF_t(data=){
        %char buf;
        if(!`fullExpression(buf=, data=, "", ");", 1)) ret false;
        fval = buf;
        ret true;
      }])) ret false;
      if(#val == 0 && #fval == 0){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      `state.ctrlList[-1].task .=
        (#val > 0 ? "`rangeSetIVar(" : "`rangeSetFVar(")
        .= (#fir > 0 ? fir : "0,")
        .= (#las > 0 ? las : (#val > 0 ? "59," : "39,"))
        .= (#val > 0 ? val : fval);
      ret true;
    }]);
  }
  bool varRandom(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool v = false;
      ^/char idx, start, end;
      if(!`stateParam(param=, "v", [`paraF_t(data=){
        v = true;
        %char buf;
        if(!`fullExpression(buf=, data=, "", "", 2)) ret false;
        idx = buf;
        ret true;
      }])) ret false;
      if(!v){
        `lasterror = "vが指定されていません";
        ret false;
      }
      if(!`stateParam(param=, "range", [`paraF_t(data=){
        %char buf;
        if(!`argExpression(buf=, data=, "", "", 2)) ret false;
        start = buf;
        branch{
          ^/char tmp = `tokenizer(data=);
        cond .s.equ(tmp, ","):
          buf.new(0);
          if(!`fullExpression(buf=, data=, "", "", 2)) ret false;
          end = buf;
        cond #tmp == 0:
          end = start;
          start = "0";
        else:
          buf.new(0);
          `lasterror = (buf .= tmp .= "が不正です");
          ret false;
        }
        if(#start > 0){
          `state.ctrlList[-1].task .=
            "`trSetIVar(" .= idx .= ",.m.randI("
            .= start .= ',' .= end .= "));";
        }
        ret true;
      }])) ret false;
      ret true;
    }]);
  }
  bool turn(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "`trTurn();";
      ret true;
    }]);
  }
  bool ctrlSet(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool value = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        value = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "`setCtrl(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      if(!value){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      ret true;
    }]);
  }
  bool stateTypeSet(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      ~$bool(^/char) stset = [bool(^/char data){
        if(#data == 0){
          `lasterror = "値が指定されていません";
          ret false;
        }
        switch(.s.toLowerChar(data[0])){
        case 's':
          `state.ctrlList[-1].task .= "`stVal.typ=.StTy::S;";
        case 'c':
          `state.ctrlList[-1].task .= "`stVal.typ=.StTy::C;";
        case 'a':
          `state.ctrlList[-1].task .= "`stVal.typ=.StTy::A;";
        case 'l':
          `state.ctrlList[-1].task .= "`stVal.typ=.StTy::L;";
        default:
          `lasterror = data + "が無効な値です";
          ret false;
        }
        ret true;
      }];
      bool st = false;
      if(!`stateParam(param=, "statetype", [`paraF_t(data=){
        st = true;
        ret stset(:data:);
      }])) ret false;
      if(!st && !`stateParam(param=, "value", [`paraF_t(data=){
        st = true;
        ret stset(:data:);
      }])) ret false;
      if(!`stateParam(param=, "physics", [`paraF_t(data=){
        if(#data == 0){
          `lasterror = "値が指定されていません";
          ret false;
        }
        switch(.s.toLowerChar(data[0])){
        case 's':
          `state.ctrlList[-1].task .= "`stVal.phy=.StTy::S;";
        case 'c':
          `state.ctrlList[-1].task .= "`stVal.phy=.StTy::C;";
        case 'a':
          `state.ctrlList[-1].task .= "`stVal.phy=.StTy::A;";
        case 'n':
          `state.ctrlList[-1].task .= "`stVal.phy=.StTy::N;";
        default:
          `lasterror = data + "が無効な値です";
          ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "movetype", [`paraF_t(data=){
        if(#data == 0){
          `lasterror = "値が指定されていません";
          ret false;
        }
        switch(.s.toLowerChar(data[0])){
        case 'i':
          `state.ctrlList[-1].task .= "`stVal.mov=.MovTy::I;";
        case 'a':
          `state.ctrlList[-1].task .= "`stVal.mov=.MovTy::A;";
        case 'h':
          `state.ctrlList[-1].task .= "`stVal.mov=.MovTy::H;";
        default:
          `lasterror = data + "が無効な値です";
          ret false;
        }
        ret true;
      }])) ret false;
      ret true;
    }]);
  }
  bool sprPriority(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "`sprpriority=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      ret true;
    }]);
  }
  bool hitDef(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      switch(`state.ctrlList[-1].typ){
      case .CtrlTy::HitDef:
        `state.ctrlList[-1].task .=
          "`stVal.hit.clear();"
          "`stVal.hit.sparkno=!`sysivar[.iSPARKNO];"
          "`stVal.hit.guard_sparkno=!`sysivar[.iGUARD_SPARKNO];";
      case .CtrlTy::Projectile:
        `state.ctrlList[-1].task .=
          "^&.Projectile pr=`newProj();if(#pr==0)ret;"
          "int pt=0,rpg=-1,rpi=0;float x=0.0,y=0.0;bool op=false;";
      case .CtrlTy::ReversalDef:
        `state.ctrlList[-1].task .= "`stVal.hit.clear();";
      }
      ^/char obj =
        `state.ctrlList[-1].typ == .CtrlTy::Projectile
        ? "pr~hit" : "`stVal.hit";
      `state.ctrlList[-1].task .=
        obj .= ".player=" .= ''`playerno .= ';';
      if(!`stateParam(param=, "attr", [`paraF_t(data=){
        int flg;
        if(!`attr(flg=, data, true)) ret false;
        `state.ctrlList[-1].task .= obj .= ".attr=" .= ''flg .= ';';
        ret true;
      }])) ret false;
      ~$bool(^/char, ^/char) hfset = [bool(^/char name, ^/char data){
        int flg = 0;
        loop{index i = 0; while; do:
          switch(data[i]){
          case 'H', 'h': flg |= (int).chr.StTy::S;
          case 'L', 'l': flg |= (int).chr.StTy::C;
          case 'M', 'm': flg |= (int).chr.StTy::S | (int).chr.StTy::C;
          case 'A', 'a': flg |= (int).chr.StTy::A;
          case 'F', 'f': flg |= (int).chr.StTy::N;
          case 'D', 'd': flg |= (int).chr.StTy::L;
          case 'P', 'p': flg |= (int).chr.StTy::U;
          case '-':      flg |= (int).chr.MovTy::I;
          case '+':      flg |= (int).chr.MovTy::H;
          }
          i++;
        while i < #data:}
        `state.ctrlList[-1].task .=
          obj .= (name[0] == 'h' ? ".hitflag=" : ".guardflag=")
          .= ''flg .= ';';
        ret true;
      }];
      if(!`stateParam(param=, "guardflag", [`paraF_t(data=){
        ret hfset(:"guardflag", data:);
      }])) ret false;
      if(!`stateParam(param=, "hitflag", [`paraF_t(data=){
        ret hfset(:"hitflag", data:);
      }])) ret false;
      ~$bool(^/char, ^/char) tyset = [bool(^/char name, ^/char data){
        if(#data == 0){
          `lasterror = "値が指定されていません";
          ret false;
        }
        switch(data[0]){
          ^/char tmp = (name[0] == 'g' ? ".ground_type" : ".air_type");
        case 'H', 'h':
          `state.ctrlList[-1].task .= obj .= tmp .= "=.ReactTy::High;";
        case 'L', 'l':
          `state.ctrlList[-1].task .= obj .= tmp .= "=.ReactTy::Low;";
        case 'T', 't':
          `state.ctrlList[-1].task .= obj .= tmp .= "=.ReactTy::Trip;";
        case 'N', 'n':
          `state.ctrlList[-1].task .= obj .= tmp .= "=.ReactTy::Non;";
        default:
          `lasterror = data + "が無効な値です";
          ret false;
        }
        ret true;
      }];
      if(!`stateParam(param=, "ground.type", [`paraF_t(data=){
        ret tyset(:"ground.type", data:);
      }])) ret false;
      if(!`stateParam(param=, "air.type", [`paraF_t(data=){
        ret tyset(:"air.type", data:);
      }])) ret false;
      ~$bool(^/char, ^/char) atset = [bool(^/char name, ^/char data){
        if(#data == 0){
          `lasterror = "値が指定されていません";
          ret false;
        }
        switch(data[0]){
          ^/char tmp =
            name[1] == 'n' ? ".animtype"
            : (name[0] == 'f' ? ".fall.animtype" : ".air_animtype");
        case 'L', 'l':
          `state.ctrlList[-1].task .= obj .= tmp .= "=.AnimTy::Light;";
        case 'M', 'm':
          `state.ctrlList[-1].task .= obj .= tmp .= "=.AnimTy::Medium;";
        case 'H', 'h':
          `state.ctrlList[-1].task .= obj .= tmp .= "=.AnimTy::Hard;";
        case 'B', 'b':
          `state.ctrlList[-1].task .= obj .= tmp .= "=.AnimTy::Back;";
        case 'U', 'u':
          `state.ctrlList[-1].task .= obj .= tmp .= "=.AnimTy::Up;";
        case 'D', 'd':
          `state.ctrlList[-1].task .= obj .= tmp .= "=.AnimTy::Diagup;";
        default:
          `lasterror = data + "が無効な値です";
          ret false;
        }
        ret true;
      }];
      if(!`stateParam(param=, "animtype", [`paraF_t(data=){
        ret atset(:"animtype", data:);
      }])) ret false;
      if(!`stateParam(param=, "air.animtype", [`paraF_t(data=){
        ret atset(:"air.animtype", data:);
      }])) ret false;
      if(!`stateParam(param=, "fall.animtype", [`paraF_t(data=){
        ret atset(:"fall.animtype", data:);
      }])) ret false;
      if(!`stateParam(param=, "affectteam", [`paraF_t(data=){
        if(#data == 0){
          `lasterror = "値が指定されていません";
          ret false;
        }
        switch(data[0]){
        case 'E', 'e':
          `state.ctrlList[-1].task .= obj .= ".affectteam=1;";
        case 'B', 'b':
          `state.ctrlList[-1].task .= obj .= ".affectteam=0;";
        case 'F', 'f':
          `state.ctrlList[-1].task .= obj .= ".affectteam=-1;";
        default:
          `lasterror = data + "が無効な値です";
          ret false;
        }
        ret true;
      }])) ret false;
      switch(`state.ctrlList[-1].typ){
      case .CtrlTy::ReversalDef:
        {
          bool reversal_attr = false;
          if(!`stateParam(param=, "reversal.attr", [`paraF_t(data=){
            reversal_attr = true;
            int flg;
            if(!`attr(flg=, data, false)) ret false;
            `state.ctrlList[-1].task .=
              obj .= ".reversal_attr=" .= ''flg .= ';';
            ret true;
          }])) ret false;
          if(!reversal_attr){
            `lasterror = "reversal.attrが指定されていません";
            ret false;
          }
        }
      case .CtrlTy::Projectile:
        if(!`stateParam(param=, "postype", [`paraF_t(data=){
          ^/char text = .s.toLower(data);
          branch{
            if(#text == 0) else;
          cond .s.equ(text[0..2], "p2"):
            `state.ctrlList[-1].task .= "pt=1;";
          cond text[0] == 'p':
            `state.ctrlList[-1].task .= "pt=0;";
          cond text[0] == 'f':
            `state.ctrlList[-1].task .= "pt=2;";
          cond text[0] == 'b':
            `state.ctrlList[-1].task .= "pt=3;";
          cond text[0] == 'l':
            `state.ctrlList[-1].task .= "pt=4;";
          cond text[0] == 'r':
            `state.ctrlList[-1].task .= "pt=5;";
          cond text[0] == 'n':
            `state.ctrlList[-1].task .= "pt=6;";
          else:
            `lasterror = data + "が無効な値です";
            ret false;
          }
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "projid", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~id=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "projremove", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~remove=(int)(", ");", 3)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "projremovetime", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~removetime=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "projshadow", [`paraF_t(data=){
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~shadowr=", ";", 2)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            if(
              !`argExpression(
                `state.ctrlList[-1].task=, data=,
                "pr~shadowg=", ";", 2)) ret false;
            if(.s.equ(",")<, `tokenizer(data=)){
              if(
                !`fullExpression(
                  `state.ctrlList[-1].task=, data=,
                  "pr~shadowb=", ";", 2)) ret false;
            }
          }
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "projmisstime", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~misstime=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "projhits", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~hits=", ";if(pr~hits<0)pr~hits=1;", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "projpriority", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~prioritypoint=pr~priority=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "projhitanim", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~hitanim=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "projremanim", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~remanim=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "projcancelanim", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~cancelanim=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "velocity", [`paraF_t(data=){
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~velocityx=", ";", 1)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            if(
              !`fullExpression(
                `state.ctrlList[-1].task=, data=,
                "pr~velocityy=", ";", 1)) ret false;
          }
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "velmul", [`paraF_t(data=){
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~velmulx=", ";", 1)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            if(
              !`fullExpression(
                `state.ctrlList[-1].task=, data=,
                "pr~velmuly=", ";", 1)) ret false;
          }
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "remvelocity", [`paraF_t(data=){
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~remvelocityx=", ";", 1)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            if(
              !`fullExpression(
                `state.ctrlList[-1].task=, data=,
                "pr~remvelocityy=", ";", 1)) ret false;
          }
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "accel", [`paraF_t(data=){
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~accelx=", ";", 1)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            if(
              !`fullExpression(
                `state.ctrlList[-1].task=, data=,
                "pr~accely=", ";", 1)) ret false;
          }
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "projscale", [`paraF_t(data=){
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~scalex=", ";", 1)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            if(
              !`fullExpression(
                `state.ctrlList[-1].task=, data=,
                "pr~scaley=", ";", 1)) ret false;
          }
          ret true;
        }])) ret false;
      }
      if(!`stateParam(param=, "id", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, ".id=.m.max!int?(0,", ");", 2))
        {
          ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "chainid", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, ".chainid=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "nochainid", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".nochainid1=", ";", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= obj;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".nochainid2=", ";", 2)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "kill", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".kill=", ";", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "guard.kill", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".guard_kill=", ";", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "fall.kill", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".fall.kill=(int)(", ");", 3)) ret false;
       ret true;
      }])) ret false;
      if(!`stateParam(param=, "hitonce", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".hitonce=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "air.juggle", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".air_juggle=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "getpower", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".hitgetpower=.m.max!int?(.com.IERR+1,", ");", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= obj;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".guardgetpower=.m.max!int?(.com.IERR+1,", ");", 2)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "damage", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".hitdamage=", ";", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= obj;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".guarddamage=", ";", 2)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "givepower", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".hitgivepower=.m.max!int?(.com.IERR+1,", ");", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= obj;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".guardgivepower=.m.max!int?(.com.IERR+1,", ");", 2)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "numhits", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, ".numhits=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      ~$bool(^/char, ^/char=) snset = [bool(^/char name, ^/char data=){
        int flg = -1;
        branch{
          if(#data == 0) else;
        cond data[0] == 'F' || data[0] == 'f':
        cond data[0] == 'S' || data[0] == 's':
          flg = 0;
        else:
          break;
        comm:
          data = data[1..-1];
        }
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "{int hsg=", ";", 2)) ret false;
        `state.ctrlList[-1].task .=
          obj .= (
            name[0] == 'h'
            ? ".hitsoundg=hsg<0?.com.IERR:" : ".guardsoundg=hsg<0?.com.IERR:")
          .= (flg == 0 ?  "hsg;}" : "!hsg;}");
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= obj;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              name[0] == 'h' ? ".hitsoundn=" : ".guardsoundn=",
              ";", 2)) ret false;
        }
        ret true;
      }];
      if(!`stateParam(param=, "hitsound", [`paraF_t(data=){
        ret snset(:"hitsound", data=:);
      }])) ret false;
      if(!`stateParam(param=, "guardsound", [`paraF_t(data=){
        ret snset(:"guardsound", data=:);
      }])) ret false;
      if(!`stateParam(param=, "priority", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, ".priority=", ";", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          data = .s.trim(data);
          if(#data == 0) break;
          switch(data[0]){
          case 'H', 'h':
            `state.ctrlList[-1].task .= obj .= ".bothhittype=.PriTy::Hit;";
          case 'M', 'm':
            `state.ctrlList[-1].task .= obj .= ".bothhittype=.PriTy::Miss;";
          case 'D', 'd':
            `state.ctrlList[-1].task .= obj .= ".bothhittype=.PriTy::Dodge;";
          default:
            `lasterror = data + "が無効な値です";
            ret false;
          }
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "p1stateno", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".p1stateno=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "p2stateno", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".p2stateno=", ";", 2)) ret false;
        `state.ctrlList[-1].task .= obj .= ".p2getp1state=1;";
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "p2getp1state", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".p2getp1state=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      bool p1sp = false;
      if(!`stateParam(param=, "p1sprpriority", [`paraF_t(data=){
        p1sp = true;
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".p1sprpriority=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!p1sp && !`stateParam(param=, "sprpriority", [`paraF_t(data=){
        p1sp = true;
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".p1sprpriority=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "p2sprpriority", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".p2sprpriority=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "forcestand", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".forcestand=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "forcenofall", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".forcenofall=", ";", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "fall.damage", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".fall.damage=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "fall.xvelocity", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".fall.xvelocity=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "fall.yvelocity", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".fall.yvelocity=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "fall.recover", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".fall.recover=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "fall.recovertime", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".fall.recovertime=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      ~$bool(^/char, ^/char=) spset = [bool(^/char name, ^/char data=){
        int flg = -1;
        branch{
          if(#data == 0) else;
        cond data[0] == 'S' || data[0] == 's':
          flg = 0;
        else:
          break;
        comm:
          data = data[1..-1];
        }
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "{int spn=", ";", 2)) ret false;
        `state.ctrlList[-1].task .=
          obj .= (
            name[0] == 's'
            ? ".sparkno=spn<0?.com.IERR:" : ".guard_sparkno=spn<0?.com.IERR:")
          .= (flg == 0 ?  "spn;}" : "!spn;}");
        ret true;
      }];
      if(!`stateParam(param=, "sparkno", [`paraF_t(data=){
        ret spset(:"sparkno", data=:);
      }])) ret false;
      if(!`stateParam(param=, "guard.sparkno", [`paraF_t(data=){
        ret spset(:"guard.sparkno", data=:);
      }])) ret false;
      if(!`stateParam(param=, "sparkxy", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, ".sparkx=", ";", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= obj;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".sparky=", ";", 1)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "down.hittime", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".down_hittime=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "p1facing", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, ".p1facing=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "p1getp2facing", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".p1getp2facing=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "mindist", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, ".mindistx=", ";", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= obj;
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=,
              ".mindisty=", ";", 1)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            if(
              !`fullExpression(
                `state.ctrlList[-1].task=, data=, "", ";", 1)) ret false;
          }
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "maxdist", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".maxdistx=", ";", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= obj;
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=,
              ".maxdisty=", ";", 1)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            if(
              !`fullExpression(
                `state.ctrlList[-1].task=, data=, "", ";", 1)) ret false;
          }
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "snap", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, ".snapx=", ";", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= obj;
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=, ".snapy=", ";", 1)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            if(
              !`argExpression(
                `state.ctrlList[-1].task=, data=, "", ";", 1)) ret false;
            if(.s.equ(",")<, `tokenizer(data=)){
              `state.ctrlList[-1].task .= obj;
              if(
                !`fullExpression(
                  `state.ctrlList[-1].task=, data=,
                  ".snapt=", ";", 2)) ret false;
            }
          }
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "p2facing", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".p2facing=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "air.hittime", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".air_hittime=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "fall", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".ground_fall=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "air.fall", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".air_fall=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "air.cornerpush.veloff", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".air_cornerpush_veloff=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "down.bounce", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".down_bounce=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "down.velocity", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".down_velocityx=", ";", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= obj;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".down_velocityy=", ";", 1)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "down.cornerpush.veloff", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".down_cornerpush_veloff=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "ground.hittime", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj .= ".guard_hittime=" .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".ground_hittime=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "guard.hittime", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".guard_hittime=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "guard.dist", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".guard_dist=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "pausetime", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj .= ".guard_pausetime=" .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".pausetime=", ";", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= obj .= ".guard_shaketime=" .= obj;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".shaketime=", ";", 2)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "guard.pausetime", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".guard_pausetime=", ";", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= obj;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".guard_shaketime=", ";", 2)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "air.velocity", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".air_velocityx=", ";", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= obj;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".air_velocityy=", ";", 1)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "airguard.velocity", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".airguard_velocityx=", ";", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= obj;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".airguard_velocityy=", ";", 1)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "ground.slidetime", [`paraF_t(data=){
        `state.ctrlList[-1].task .=
          obj .= ".guard_slidetime=" .= obj
          .= ".guard_ctrltime=" .= obj .= ".airguard_ctrltime=" .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".ground_slidetime=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "guard.slidetime", [`paraF_t(data=){
        `state.ctrlList[-1].task .=
          obj .= ".guard_ctrltime=" .= obj .= ".airguard_ctrltime=" .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".guard_slidetime=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "guard.ctrltime", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj .= ".airguard_ctrltime=" .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".guard_ctrltime=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "airguard.ctrltime", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".airguard_ctrltime=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "ground.velocity", [`paraF_t(data=){
        ^/char oldin = data, tmp;
        branch{
        cond .s.equ(`tokenizer(data=), "n"):
          oldin = data;
          tmp = `tokenizer(data=);
          if(#tmp > 0 && !.s.equ(tmp, ",")){
            `lasterror = "nがエラーです";
            ret false;
          }
          data = oldin;
        else:
          data = oldin;
          `state.ctrlList[-1].task .= obj;
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=,
              ".ground_velocityx=", ";", 1)) ret false;
        }
        if(.s.equ(",")<, `tokenizer(data=)){
          ^/char oldin = data, tmp;
          branch{
          cond .s.equ(`tokenizer(data=), "n"):
            tmp = `tokenizer(data=);
            if(#tmp > 0){
              `lasterror = "nがエラーです";
              ret false;
            }
          else:
            data = oldin;
            `state.ctrlList[-1].task .= obj;
            if(
              !`fullExpression(
                `state.ctrlList[-1].task=, data=,
                ".ground_velocityy=", ";", 1)) ret false;
          }
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "guard.velocity", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".guard_velocity=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "ground.cornerpush.veloff", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".ground_cornerpush_veloff=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "guard.cornerpush.veloff", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".guard_cornerpush_veloff=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "airguard.cornerpush.veloff", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".airguard_cornerpush_veloff=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "yaccel", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, ".yaccel=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "palfx.time", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".palfx_time=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "palfx.color", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".palfx_color=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "palfx.add", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".palfx_addr=", ";", 2)) ret false;
        if(!.s.equ(",")<, `tokenizer(data=)){
          `lasterror = data + "palfx.addの要素が足りません";
          ret false;
        }
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".palfx_addg=", ";", 2)) ret false;
        if(!.s.equ(",")<, `tokenizer(data=)){
          `lasterror = data + "palfx.addの要素が足りません";
          ret false;
        }
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".palfx_addb=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "palfx.mul", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".palfx_mulr=", ";", 2)) ret false;
        if(!.s.equ(",")<, `tokenizer(data=)){
          `lasterror = data + "palfx.mulの要素が足りません";
          ret false;
        }
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".palfx_mulg=", ";", 2)) ret false;
        if(!.s.equ(",")<, `tokenizer(data=)){
          `lasterror = data + "palfx.mulの要素が足りません";
          ret false;
        }
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".palfx_mulb=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "palfx.sinadd", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".palfx_amplr=", ";", 2)) ret false;
        if(!.s.equ(",")<, `tokenizer(data=)){
          `lasterror = data + "palfx.sinaddの要素が足りません";
          ret false;
        }
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".palfx_amplg=", ";", 2)) ret false;
        if(!.s.equ(",")<, `tokenizer(data=)){
          `lasterror = data + "palfx.sinaddの要素が足りません";
          ret false;
        }
        `state.ctrlList[-1].task .= obj;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".palfx_amplb=", ";", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= obj;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".palfx_cycletime=", ";", 2)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "palfx.invertall", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".palfx_invertall=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "envshake.time", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".envshake_time=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "envshake.ampl", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".envshake_ampl=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "envshake.phase", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".envshake_phase=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "envshake.freq", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".envshake_freq=.m.max!float?(0.0,", ");", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "fall.envshake.time", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".fall.envshake_time=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "fall.envshake.ampl", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".fall.envshake_ampl=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "fall.envshake.phase", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".fall.envshake_phase=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "fall.envshake.freq", [`paraF_t(data=){
        `state.ctrlList[-1].task .= obj;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".fall.envshake_freq=.m.max!float?(0.0,", ");", 1)) ret false;
        ret true;
      }])) ret false;
      if(`state.ctrlList[-1].typ == .CtrlTy::Projectile){
        if(!`stateParam(param=, "offset", [`paraF_t(data=){
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=, "x=", ";", 1)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            if(
              !`fullExpression(
                `state.ctrlList[-1].task=, data=, "y=", ";", 1)) ret false;
          }
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "projsprpriority", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~sprpriority=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "projstagebound", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~stagebound=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "projedgebound", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~edgebound=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "projheightbound", [`paraF_t(data=){
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~heightboundt=", ";", 2)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            if(
              !`fullExpression(
                `state.ctrlList[-1].task=, data=,
                "pr~heightboundb=", ";", 2)) ret false;
          }
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "projanim", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~anim=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "supermovetime", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~supermovetime=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "pausemovetime", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "pr~pausemovetime=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "ownpal", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=, "op=", ";", 3)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "remappal", [`paraF_t(data=){
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=, "rpg=", ";", 2)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            if(
              !`fullExpression(
                `state.ctrlList[-1].task=, data=, "rpi=", ";", 2)) ret false;
          }
          ret true;
        }])) ret false;
        if(!`afterImageSub(param=, "afterimage.", "pr~")) ret false;
      }
      `state.ctrlList[-1].task .= "`setHitdefDefault";
      branch{
      cond `state.ctrlList[-1].typ == .CtrlTy::Projectile:
        `state.ctrlList[-1].task .=
          "(pr~hit=,true);"
          "if(pr~remanim==.com.IERR)pr~remanim=pr~hitanim;"
          "if(pr~cancelanim==.com.IERR)pr~cancelanim=pr~remanim;"
          "`trProjInit(pr<>=,pt,x,y,op,rpg,rpi);";
      else:
        `state.ctrlList[-1].task .= "(`stVal.hit=,false);";
      }
      ret true;
    }]);
  }
  bool attackDist(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool value = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        value = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "`attackdist=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!value){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      ret true;
    }]);
  }
  bool hitOverride(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "int a=0,s=0,st=-1,t=1,f=0;";
      if(!`stateParam(param=, "attr", [`paraF_t(data=){
        int flg;
        if(!`attr(flg=, data, false)) ret false;
        `state.ctrlList[-1].task .= "a=" .= ''flg .= ';';
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "slot", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "s=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "stateno", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "st=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "time", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "t=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "forceair", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "f=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      `state.ctrlList[-1].task .=
        "if(s<0||s>7)s=0;if(t==0||t<-1)t=1;if(st<0)t=0;"
        "`stVal.ho[s].player=" .= ''`playerno .= ";"
        "`stVal.ho[s].attr=a;`stVal.ho[s].stateno=st;"
        "`stVal.ho[s].time=t;`stVal.ho[s].forceair=f;";
      ret true;
    }]);
  }
  bool pause(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .=
        "int t=0,mt=0;.pausebg=1;.pauseendcmdbuftime=0;";
      if(!`stateParam(param=, "time", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "t=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "movetime", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "mt=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "pausebg", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".pausebg=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "endcmdbuftime", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".pauseendcmdbuftime=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      `state.ctrlList[-1].task .= "`setPauseTime(t,mt);";
      ret true;
    }]);
  }
  bool superPause(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .=
        .sndstart
        .= "int t=30,mt=0;bool uh=true;"
        ".superanim=.fight~getAction(30);.superfacing=`facing;"
        ".superposx=`sysfvar[.fX];.superposy=`sysfvar[.fY];"
        ".superdarken=1;.superp2defmul=.cfg.Super_TargetDefenceMul;"
        ".superpausebg=1;.superendcmdbuftime=0;";
      if(!`stateParam(param=, "time", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "t=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "movetime", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "mt=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "pausebg", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".superpausebg=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "endcmdbuftime", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".superendcmdbuftime=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "darken", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".superdarken=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "anim", [`paraF_t(data=){
        branch{
          if(#data == 0) else;
        cond data[0] == 'S' || data[0] == 's':
          data = data[1..-1];
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".superpmap~remap=`getPalMap();.superanim=`getAction (",
              ");", 2)) ret false;
        cond data[0] == 'F' || data[0] == 'f':
          data = data[1..-1];
          else;
        else:
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".superpmap~remap.new(0);.superanim=.fight~getAction(",
              ");", 2)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "pos", [`paraF_t(data=){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".superposx=`sysfvar[.fX]+(float)`facing*",
            ";", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".superposy=`sysfvar[.fY]+", ";", 1)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "p2defmul", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".superp2defmul=",
            ";if(.superp2defmul==0.0)"
            ".superp2defmul=.cfg.Super_TargetDefenceMul;", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "poweradd", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "`addPower(", ");", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "unhittable", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "uh=", ";", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "sound", [`paraF_t(data=){
        branch{
          if(#data == 0) else;
        cond data[0] == 'F' || data[0] == 'f':
          `state.ctrlList[-1].task .= "f=true;";
        cond data[0] == 'S' || data[0] == 's':
        else:
          `state.ctrlList[-1].task .= "f=true;";
          break;
        comm:
          data = data[1..-1];
        }
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "g=", ";", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=, "s=", ";", 2)) ret false;
        }
        ret true;
      }])) ret false;
      `state.ctrlList[-1].task .= "`setSuperPauseTime(t,mt,uh);" .= .sndend;
      ret true;
    }]);
  }
  bool lifeAdd(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "int va=0,k=1,a=0;";
      if(!`stateParam(param=, "absolute", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "a=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "kill", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "k=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      bool value = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        value = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "va=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!value){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      `state.ctrlList[-1].task .= "`addLife((double)va,k!=0,a!=0);";
      ret true;
    }]);
  }
  bool lifeSet(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool value = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        value = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "`setLife(", ");", 2)) ret false;
        ret true;
      }])) ret false;
      if(!value){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      ret true;
    }]);
  }
  bool powerAdd(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool value = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        value = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "`addPower(", ");", 2)) ret false;
        ret true;
      }])) ret false;
      if(!value){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      ret true;
    }]);
  }
  bool powerSet(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool value = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        value = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "`addPower(", "-`getSharePower());", 2)) ret false;
        ret true;
      }])) ret false;
      if(!value){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      ret true;
    }]);
  }
  bool targetLifeAdd(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .=
        "%int tar=`getTarget(-1);if(#tar==0)ret;int va=0,k=1,a=0;";
      if(!`stateParam(param=, "id", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "tar=`getTarget(", ");if(#tar==0)ret;", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "absolute", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "a=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "kill", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "k=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      bool value = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        value = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "va=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!value){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      `state.ctrlList[-1].task .= "`trTargetLifeAdd(tar,va,k!=0,a!=0);";
      ret true;
    }]);
  }
  bool targetBind(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .=
        "%int tar=`getTarget(-1);if(#tar==0)ret;int t=1;float x=0.0,";
      switch(`state.ctrlList[-1].typ){
      case .CtrlTy::TargetBind:
        `state.ctrlList[-1].task .= "y=0.0;";
      case .CtrlTy::BindToTarget:
        `state.ctrlList[-1].task .= "y=0.0/0.0;int hmf=0;";
      }
      if(!`stateParam(param=, "id", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "tar=`getTarget(", ");if(#tar==0)ret;", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "time", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "t=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "pos", [`paraF_t(data=){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "x=", ";", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=, "y=", ";", 1)) ret false;
          if(
            .s.equ(",")<, `tokenizer(data=)
            && `state.ctrlList[-1].typ == .CtrlTy::BindToTarget)
          {
            ^/char t = `tokenizer(data=);
            if(#t == 0) break;
            switch(.s.toLowerChar(t[0])){
            case 'h':
              `state.ctrlList[-1].task .= "hmf=2;";
            case 'm':
              `state.ctrlList[-1].task .= "hmf=1;";
            case 'f':
              `state.ctrlList[-1].task .= "hmf=0;";
            }
          }
        }
        ret true;
      }])) ret false;
      switch(`state.ctrlList[-1].typ){
      case .CtrlTy::TargetBind:
        `state.ctrlList[-1].task .= "`trTargetBind(tar,t,x,y);";
      case .CtrlTy::BindToTarget:
        `state.ctrlList[-1].task .= "`trBindToTarget(tar,t,x,y,hmf);";
      }
      ret true;
    }]);
  }
  bool targetState(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .=
        "%int tar=`getTarget(-1);if(#tar==0)ret;int s=0;";
      if(!`stateParam(param=, "id", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "tar=`getTarget(", ");if(#tar==0)ret;", 2)) ret false;
        ret true;
      }])) ret false;
      bool value = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        value = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "s=", ";", 2)) ret false;
       ret true;
      }])) ret false;
      if(!value){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      `state.ctrlList[-1].task .= "`trTargetState(tar,s);";
      ret true;
    }]);
  }
  bool targetVelSet(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "%int tar=`getTarget(-1);if(#tar==0)ret;";
      if(!`stateParam(param=, "id", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "tar=`getTarget(", ");if(#tar==0)ret;", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "x", [`paraF_t(data=){
        `state.ctrlList[-1].task .=
          `state.ctrlList[-1].typ == .CtrlTy::TargetVelSet
          ? "`trTargetVelSetX(tar," : "`trTargetVelAddX(tar,";
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "", ");", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "y", [`paraF_t(data=){
        `state.ctrlList[-1].task .=
          `state.ctrlList[-1].typ == .CtrlTy::TargetVelSet
          ? "`trTargetVelSetY(tar," : "`trTargetVelAddY(tar,";
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "", ");", 1)) ret false;
        ret true;
      }])) ret false;
      ret true;
    }]);
  }
  bool targetFacing(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "%int tar=`getTarget(-1);if(#tar==0)ret;";
      if(!`stateParam(param=, "id", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "tar=`getTarget(", ");if(#tar==0)ret;", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "`trTargetFacing(tar,", ");", 2)) ret false;
        ret true;
      }])) ret false;
      ret true;
    }]);
  }
  bool targetPowerAdd(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "%int tar=`getTarget(-1);if(#tar==0)ret;";
      if(!`stateParam(param=, "id", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "tar=`getTarget(", ");if(#tar==0)ret;", 2)) ret false;
        ret true;
      }])) ret false;
      bool value = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        value = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "`trTargetPowerAdd(tar,", ");", 2)) ret false;
        ret true;
      }])) ret false;
      if(!value){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      ret true;
    }]);
  }
  bool targetDrop(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .=
        "if(#`getTarget(-1)==0)ret;int ex=-1;bool one=true;";
      if(!`stateParam(param=, "excludeid", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "ex=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "keepone", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "one=", ";", 3)) ret false;
        ret true;
      }])) ret false;
      `state.ctrlList[-1].task .= "`trTargetDrop(ex,one);";
      ret true;
    }]);
  }
  bool hitBy(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool val = false, ni = false;
      ~$bool(^/char) valset = [bool(^/char data){
        int flg;
        if(!`attr(flg=, data, false)) ret false;
        if(`state.ctrlList[-1].typ == .CtrlTy::NotHitBy) flg = !flg;
        `state.ctrlList[-1].task .=
          (ni ? "`stVal.hb.hitf2=" : "`stVal.hb.hitf1=") .= ''flg .= ';';
        ret true;
      }];
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        val = true;
        ret valset(:data:);
      }])) ret false;
      if(!val && !`stateParam(param=, "value2", [`paraF_t(data=){
        val = ni = true;
        ret valset(:data:);
      }])) ret false;
      if(!val){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      bool time = false;
      if(!`stateParam(param=, "time", [`paraF_t(data=){
        time = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            (ni ? "`stVal.hb.hitt2=" : "`stVal.hb.hitt1="),
            ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!time){
        `state.ctrlList[-1].task .=
          (ni ? "`stVal.hb.hitt2=1;" : "`stVal.hb.hitt1=1;");
      }
      ret true;
    }]);
  }
  bool attackMulSet(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool value = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        value = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "`attackmult=" , ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!value){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      ret true;
    }]);
  }
  bool defenceMulSet(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool value = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        value = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "`defencemult=" , ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!value){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      ret true;
    }]);
  }
  bool moveHitReset(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "`clearMoveHit();";
      ret true;
    }]);
  }
  bool assertSpecial(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool flag = false;
      ~`paraF_t flset = [`paraF_t(data=){
        flag = true;
        ^/char text = .s.toLower(data);
        branch{
        cond .s.equ(text, "noautoturn"):
          `state.ctrlList[-1].task .=
            "`sysivar[.iSPECIALFLAG]|=.lsNOAUTOTURN;";
        cond .s.equ(text, "nowalk"):
          `state.ctrlList[-1].task .=
            "`sysivar[.iSPECIALFLAG]|=.lsNOWALK;";
        cond .s.equ(text, "nostandguard"):
          `state.ctrlList[-1].task .=
            "`sysivar[.iSPECIALFLAG]|=.lsNOSTANDGUARD;";
        cond .s.equ(text, "nocrouchguard"):
          `state.ctrlList[-1].task .=
            "`sysivar[.iSPECIALFLAG]|=.lsNOCROUCHGUARD;";
        cond .s.equ(text, "noairguard"):
          `state.ctrlList[-1].task .=
            "`sysivar[.iSPECIALFLAG]|=.lsNOAIRGUARD;";
        cond .s.equ(text, "roundnotover"):
          `state.ctrlList[-1].task .= ".specialFlag|=.gsROUNDNOTOVER;";
        cond .s.equ(text, "nomusic"):
          `state.ctrlList[-1].task .= ".specialFlag|=.gsNOMUSIC;";
        cond .s.equ(text, "nobardisplay"):
          `state.ctrlList[-1].task .= ".specialFlag|=.gsNOBARDISPLAY;";
        cond .s.equ(text, "noshadow"):
          `state.ctrlList[-1].task .=
            "`sysivar[.iSPECIALFLAG]|=.lsNOSHADOW;";
        cond .s.equ(text, "intro"):
          `state.ctrlList[-1].task .= ".specialFlag|=.gsINTRO;";
        cond .s.equ(text, "nokosnd"):
          `state.ctrlList[-1].task .= ".specialFlag|=.gsNOKOSND;";
        cond .s.equ(text, "nobg"):
          `state.ctrlList[-1].task .= ".specialFlag|=.gsNOBG;";
        cond .s.equ(text, "nofg"):
          `state.ctrlList[-1].task .= ".specialFlag|=.gsNOFG;";
        cond .s.equ(text, "invisible"):
          `state.ctrlList[-1].task .=
            "`sysivar[.iSPECIALFLAG]|=.lsINVISIBLE;";
        cond .s.equ(text, "globalnoshadow"):
          `state.ctrlList[-1].task .= ".specialFlag|=.gsGLOBALNOSHADOW;";
        cond .s.equ(text, "timerfreeze"):
          `state.ctrlList[-1].task .= ".specialFlag|=.gsTIMERFREEZE;";
        cond .s.equ(text, "nokoslow"):
          `state.ctrlList[-1].task .= ".specialFlag|=.gsNOKOSLOW;";
        cond .s.equ(text, "unguardable"):
          `state.ctrlList[-1].task .=
            "`sysivar[.iSPECIALFLAG]|=.lsUNGUARDABLE;";
        cond .s.equ(text, "nojugglecheck"):
          `state.ctrlList[-1].task .=
            "`sysivar[.iSPECIALFLAG]|=.lsNOJUGGLECHECK;";
        cond .s.equ(text, "noko"):
          `state.ctrlList[-1].task .= ".specialFlag|=.gsNOKO;";
        else:
          `lasterror = data + "が無効な値です";
          ret false;
        }
        ret true;
      }];
      if(!`stateParam(param=, "flag", flset)) ret false;
      if(!flag){
        `lasterror = "flagが指定されていません";
        ret false;
      }
      if(!`stateParam(param=, "flag2", flset)) ret false;
      if(!`stateParam(param=, "flag3", flset)) ret false;
      ret true;
    }]);
  }
  bool posFreeze(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool val = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        val = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "if(",
            ")`sysivar[.iSPECIALFLAG]|=.lsPOSFREEZEX|.lsPOSFREEZEY;",
            3)) ret false;
        ret true;
      }])) ret false;
      if(!val){
        `state.ctrlList[-1].task .=
          "`sysivar[.iSPECIALFLAG]|=.lsPOSFREEZEX|.lsPOSFREEZEY;";
      }
      ret true;
    }]);
  }
  bool playerPush(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool val = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        val = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "branch{cond ",
            ":`sysivar[.iSPECIALFLAG]|=.lsPLAYERPUSH;"
            "else:`sysivar[.iSPECIALFLAG]&=!.lsPLAYERPUSH;}", 3)) ret false;
        ret true;
      }])) ret false;
      if(!val){
        `state.ctrlList[-1].task .= "`sysivar[.iSPECIALFLAG]|=.lsPLAYERPUSH;";
      }
      ret true;
    }]);
  }
  bool gravity(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "`gravity();";
      ret true;
    }]);
  }
  bool bindTo(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      switch(`state.ctrlList[-1].typ){
      case .CtrlTy::BindToParent:
        `state.ctrlList[-1].task .=
          "`trParent();if(#.c==0)ret;"
          "`sysivar[.iBINDTIME]=1;"
          "`sysfvar[.fBINDPOSX]=0.0;`sysfvar[.fBINDPOSY]=0.0;"
          "`setBindToId(.c<>=);";
      case .CtrlTy::BindToRoot:
        `state.ctrlList[-1].task .=
          "`trRoot();if(#.c==0)ret;"
          "`sysivar[.iBINDTIME]=1;"
          "`sysfvar[.fBINDPOSX]=0.0;`sysfvar[.fBINDPOSY]=0.0;"
          "`setBindToId(.c<>=);";
      }
      if(!`stateParam(param=, "time", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "`sysivar[.iBINDTIME]=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "facing", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "`setBindFacing(", ");", 2))
        {
          ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "pos", [`paraF_t(data=){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            "`sysfvar[.fBINDPOSX]=", ";", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "`sysfvar[.fBINDPOSY]=", ";", 1)) ret false;
        }
        ret true;
      }])) ret false;
      `state.ctrlList[-1].task .=
        "if(`sysivar[.iBINDTIME]==0)`sysivar[.iBINDTOID]=-1;";
      ret true;
    }]);
  }
  bool helper(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .=
        "^`self h;`trNewHelper(h=);if(#h==0)ret;"
        "int pt=0,f=1,st=0,o=0;float x=0.0,y=0.0;";
      if(!`stateParam(param=, "helpertype", [`paraF_t(data=){
        if(#data == 0){
          `lasterror = "値が指定されていません";
          ret false;
        }
        switch(.s.toLowerChar(data[0])){
        case 'n':
          `state.ctrlList[-1].task .= "h~player=false;";
        case 'p':
          `state.ctrlList[-1].task .= "h~player=true;";
        default:
          `lasterror = data + "が無効な値です";
          ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "name", [`paraF_t(data=){
        branch{
        cond #data >= 2 && data[0] == '"' && data[-1] == '"':
          data = .s.join(\"\\\"\", .s.split(\", data[1 .. #data - 1]));
        else:
          `lasterror = \""で囲まれていません";
          ret false;
        }
        `state.ctrlList[-1].task .=
          "h~name=.s.clone!char?("\" .= data .= \"");";
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "postype", [`paraF_t(data=){
        ^/char text = .s.toLower(data);
        branch{
          if(#text == 0) else;
        cond .s.equ(text[0..2], "p2"):
          `state.ctrlList[-1].task .= "pt=1;";
        cond text[0] == 'p':
          `state.ctrlList[-1].task .= "pt=0;";
        cond text[0] == 'f':
          `state.ctrlList[-1].task .= "pt=2;";
        cond text[0] == 'b':
          `state.ctrlList[-1].task .= "pt=3;";
        cond text[0] == 'l':
          `state.ctrlList[-1].task .= "pt=4;";
        cond text[0] == 'r':
          `state.ctrlList[-1].task .= "pt=5;";
        cond text[0] == 'n':
          `state.ctrlList[-1].task .= "pt=6;";
        else:
          `lasterror = data + "が無効な値です";
          ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "ownpal", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "o=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "size.xscale", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "h~sysfvar[.fXSCALE]=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "size.yscale", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "h~sysfvar[.fYSCALE]=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "size.ground.back", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "h~sysivar[.iGROUND_BACK]=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "size.ground.front", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "h~sysivar[.iGROUND_FRONT]=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "size.air.back", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "h~sysivar[.iAIR_BACK]=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "size.air.front", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "h~sysivar[.iAIR_FRONT]=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "size.height", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "h~sysivar[.iHEIGHT]=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "size.proj.doscale", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "h~sysivar[.iPROJ_DOSCALE]=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "size.head.pos", [`paraF_t(data=){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            "h~sysivar[.iHEAD_POSX]=", ";", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "h~sysivar[.iHEAD_POSY]=", ";", 2)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "size.mid.pos", [`paraF_t(data=){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            "h~sysivar[.iMID_POSX]=", ";", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "h~sysivar[.iMID_POSY]=", ";", 2)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "size.shadowoffset", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "h~sysivar[.iSHADOWOFFSET]=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "stateno", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "st=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "keyctrl", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "h~keyctrl=", ";", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "id", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "h~helperid=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "pos", [`paraF_t(data=){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "x=", ";", 1)) ret false;
         if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=, "y=", ";", 1)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "facing", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "f=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "pausemovetime", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "h~sysivar[.iPAUSEMOVETIME]=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "supermovetime", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "h~sysivar[.iSUPERMOVETIME]=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      `state.ctrlList[-1].task .= "`trHelperInit(h<>=,st,pt,x,y,f,o);";
      ret true;
    }]);
  }
  bool destroySelf(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "bool rec=false,rem=false;";
      if(!`stateParam(param=, "recursive", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "rec=", ";", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "removeexplods", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "rem=", ";", 3)) ret false;
        ret true;
      }])) ret false;
      `state.ctrlList[-1].task .= "`trDestroySelf(rec,rem);";
      ret true;
    }]);
  }
  bool explod(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      switch(`state.ctrlList[-1].typ){
      case .CtrlTy::Explod:
        `state.ctrlList[-1].task .=
          "index i;^&.Explod e=`newExplod(i=);"
          "if(#e==0)ret;int t=0,rpg=-1,rpi=0;float rx=0.0,ry=0.0;e~id=0;";
        if(!`stateParam(param=, "ownpal", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "e~ownpal=(int)(", ");", 3)) ret false;
          ret true;
        }])) ret false;
      case .CtrlTy::GameMakeAnim:
        `state.ctrlList[-1].task .=
          "index i;^&.Explod e=`newExplod(i=);if(#e==0)ret;"
          "int t=0;float rx=0.0,ry=0.0;"
          "e~ontop=1;e~sprpriority=.consts.int_t::MIN;e~ownpal=1;";
      case .CtrlTy::ModifyExplod:
        `state.ctrlList[-1].task .=
          "&.ModifyExplod m;int t=-1,rpg=-1,rpi=0;float rx=0.0,ry=0.0;";
      }
      ^/char exp =
        `state.ctrlList[-1].typ == .CtrlTy::ModifyExplod ? "m" : "e<>";
      bool addalphaNone = false;
      if(`state.ctrlList[-1].typ != .CtrlTy::GameMakeAnim){
        if(!`stateParam(param=, "postype", [`paraF_t(data=){
          ^/char text = .s.toLower(data);
          branch{
            if(#text == 0) else;
          cond .s.equ(text[0..2], "p2"):
            `state.ctrlList[-1].task .= exp .= ".postype=1;";
          cond text[0] == 'p':
            `state.ctrlList[-1].task .= exp .= ".postype=0;";
          cond text[0] == 'f':
            `state.ctrlList[-1].task .= exp .= ".postype=2;";
          cond text[0] == 'b':
            `state.ctrlList[-1].task .= exp .= ".postype=3;";
          cond text[0] == 'l':
            `state.ctrlList[-1].task .= exp .= ".postype=4;";
          cond text[0] == 'r':
            `state.ctrlList[-1].task .= exp .= ".postype=5;";
          cond text[0] == 'n':
            `state.ctrlList[-1].task .= exp .= ".postype=6;";
          else:
            `lasterror = data + "が無効な値です";
            ret false;
          }
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "trans", [`paraF_t(data=){
          ^/char text = .s.toLower(data);
          branch{
          cond .s.equ(text, "default"):
            `state.ctrlList[-1].task .= "t=0;";
          cond .s.equ(text, "none"):
            `state.ctrlList[-1].task .= "t=1;";
          cond .s.equ(text, "add"):
            `state.ctrlList[-1].task .= "t=2;";
          cond .s.equ(text, "addalpha") || .s.equ(text, "alpha"):
            `state.ctrlList[-1].task .= "t=3;";
            addalphaNone = true;
          cond .s.equ(text, "add1"):
            `state.ctrlList[-1].task .= "t=4;";
          cond .s.equ(text, "sub"):
            `state.ctrlList[-1].task .= "t=5;";
          else:
            if(!.cfg.IgnoreMostErrors){
              `lasterror = data + "が無効な値です";
              ret false;
            }
          }
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "remappal", [`paraF_t(data=){
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=, "rpg=", ";", 2)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            if(
              !`fullExpression(
                `state.ctrlList[-1].task=, data=, "rpi=", ";", 2)) ret false;
          }
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "id", [`paraF_t(data=){
          `state.ctrlList[-1].task .= exp;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=, ".id=", ";", 2)) ret false;
          if(`state.ctrlList[-1].typ == .CtrlTy::Explod){
            `state.ctrlList[-1].task .= "if(e~id<0)e~id=0;";
          }
          ret true;
        }])) ret false;
        if(`state.ctrlList[-1].typ == .CtrlTy::ModifyExplod){
          `state.ctrlList[-1].task .=
            "if(.v.setI(m.id)$`trNumExplod()$.v.toI()<=0)ret;";
        }
        if(!`stateParam(param=, "facing", [`paraF_t(data=){
          `state.ctrlList[-1].task .= exp;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".relativef=", "<0?-1:1;", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "vfacing", [`paraF_t(data=){
          `state.ctrlList[-1].task .= exp;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".vfacing=", "<0?-1:1;", 2)) ret false;
          ret true;
        }])) ret false;
      }
      if(!`stateParam(param=, "pos", [`paraF_t(data=){
        `state.ctrlList[-1].task .= exp;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".offsetx=", ";", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= exp;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".offsety=", ";", 1)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "random", [`paraF_t(data=){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "rx=", ";", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=, "ry=", ";", 1)) ret false;
        }
        ret true;
      }])) ret false;
      if(`state.ctrlList[-1].typ != .CtrlTy::GameMakeAnim){
        bool vel = false;
        ~`paraF_t velset = [`paraF_t(data=){
          vel = true;
          `state.ctrlList[-1].task .= exp;
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=,
              ".velocityx=", ";", 1)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            `state.ctrlList[-1].task .= exp;
            if(
              !`fullExpression(
                `state.ctrlList[-1].task=, data=,
                ".velocityy=", ";", 1)) ret false;
          }
          ret true;
        }];
        if(!`stateParam(param=, "vel", velset)) ret false;
        if(!vel && !`stateParam(param=, "velocity", velset)) ret false;
        if(!`stateParam(param=, "accel", [`paraF_t(data=){
          `state.ctrlList[-1].task .= exp;
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=, ".accelx=", ";", 1)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            `state.ctrlList[-1].task .= exp;
            if(
              !`fullExpression(
                `state.ctrlList[-1].task=, data=,
                ".accely=", ";", 1)) ret false;
          }
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "scale", [`paraF_t(data=){
          `state.ctrlList[-1].task .= exp;
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=, ".scalex=", ";", 1)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            `state.ctrlList[-1].task .= exp;
            if(
              !`fullExpression(
                `state.ctrlList[-1].task=, data=,
                ".scaley=", ";", 1)) ret false;
          }
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "bindtime", [`paraF_t(data=){
          `state.ctrlList[-1].task .= exp;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".bindtime=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "removetime", [`paraF_t(data=){
          `state.ctrlList[-1].task .= exp;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".removetime=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "supermove", [`paraF_t(data=){
          `state.ctrlList[-1].task .= exp;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".supermovetime=", "?-1:0;", 3)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "supermovetime", [`paraF_t(data=){
          `state.ctrlList[-1].task .= exp;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".supermovetime=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "pausemovetime", [`paraF_t(data=){
          `state.ctrlList[-1].task .= exp;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".pausemovetime=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "sprpriority", [`paraF_t(data=){
          `state.ctrlList[-1].task .= exp;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".sprpriority=", ";", 2)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "ontop", [`paraF_t(data=){
          `state.ctrlList[-1].task .= exp;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".ontop=(int)(", ");", 3)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "shadow", [`paraF_t(data=){
          `state.ctrlList[-1].task .= exp;
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=,
              ".shadowr=", ";", 2)) ret false;
          if(.s.equ(",")<, `tokenizer(data=)){
            `state.ctrlList[-1].task .= exp;
            if(
              !`argExpression(
                `state.ctrlList[-1].task=, data=,
                ".shadowg=", ";", 2)) ret false;
            if(.s.equ(",")<, `tokenizer(data=)){
              `state.ctrlList[-1].task .= exp;
              if(
                !`fullExpression(
                  `state.ctrlList[-1].task=, data=,
                  ".shadowb=", ";", 2)) ret false;
            }
          }
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "removeongethit", [`paraF_t(data=){
          `state.ctrlList[-1].task .= exp;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".removeongethit=(int)(", ");", 3)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "alpha", [`paraF_t(data=){
          addalphaNone = false;
          `state.ctrlList[-1].task .= exp;
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=, ".alphas=", ";", 2)) ret false;
          `state.ctrlList[-1].task .= exp;
          branch{
          cond .s.equ(",")<, `tokenizer(data=):
            if(
              !`fullExpression(
                `state.ctrlList[-1].task=, data=,
                ".alphad=", ";", 2)) ret false;
          else:
            `state.ctrlList[-1].task .= ".alphad=255;";
          }
          ret true;
        }])) ret false;
        if(addalphaNone) `state.ctrlList[-1].task .= "t=0;";
      }
      if(`state.ctrlList[-1].typ == .CtrlTy::GameMakeAnim){
        if(!`stateParam(param=, "under", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "e~ontop=(int)!(", ");", 3)) ret false;
          ret true;
        }])) ret false;
      }
      if(`state.ctrlList[-1].typ != .CtrlTy::ModifyExplod){
        bool anim = false;
        ~`paraF_t aniset = [`paraF_t(data=){
          anim = true;
          branch{
            if(#data == 0) else;
          cond `state.ctrlList[-1].typ == .CtrlTy::GameMakeAnim:
            branch{
            cond data[0] == 'S' || data[0] == 's':
              `state.ctrlList[-1].task .= exp .= ".ani=`";
            else:
              `state.ctrlList[-1].task .= exp .= ".ani=.fight~";
              break, break;
            }
          else:
            branch{
            cond data[0] == 'F' || data[0] == 'f':
              `state.ctrlList[-1].task .= exp .= ".ani=.fight~";
            else:
              `state.ctrlList[-1].task .= exp .= ".ani=`";
              break, break;
            }
          comm:
            data = data[1..-1];
          }
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "getAction(", ");", 2)) ret false;
          ret true;
        }];
        if(!`stateParam(param=, "anim", aniset)) ret false;
        if(
          !anim && `state.ctrlList[-1].typ == .CtrlTy::GameMakeAnim
          && !`stateParam(param=, "value", aniset)) ret false;
      }
      if(`state.ctrlList[-1].typ != .CtrlTy::GameMakeAnim){
        if(!`stateParam(param=, "angle", [`paraF_t(data=){
          `state.ctrlList[-1].task .= exp;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=, ".angle=", ";", 1)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "yangle", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=, "", ";", 1)) ret false;
          ret true;
        }])) ret false;
        if(!`stateParam(param=, "xangle", [`paraF_t(data=){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=, "", ";", 1)) ret false;
          ret true;
        }])) ret false;
      }
      switch(`state.ctrlList[-1].typ){
      case .CtrlTy::Explod, .CtrlTy::GameMakeAnim:
        if(`state.ctrlList[-1].typ == .CtrlTy::GameMakeAnim){
          `state.ctrlList[-1].task .=
            "e~offsetx-=(float)`sysivar[.iDRAW_OFFSETX];"
            .= "e~offsety-=(float)`sysivar[.iDRAW_OFFSETY];";
        }
        `state.ctrlList[-1].task .=
          "e~offsetx+=.m.randF(-rx,rx);e~offsety+=.m.randF(-ry,ry);"
          "e~setPos(`=);`setAlpha(t,e~alphas=,e~alphad=);";
        switch(`state.ctrlList[-1].typ){
        case .CtrlTy::Explod:
          `state.ctrlList[-1].task .=
            "`insertExplodEx(i,rpg,rpi);"
            "e~ignorehitpause=ih;if(e~ontop != 0)e~sprpriority=0;";
        case .CtrlTy::GameMakeAnim:
          `state.ctrlList[-1].task .= "`insertExplod(i);";
        }
      case .CtrlTy::ModifyExplod:
        `state.ctrlList[-1].task .=
          "if(!.m.isnan(m.offsetx))m.offsetx+=.m.randF(-rx,rx);"
          "if(!.m.isnan(m.offsety))m.offsety+=.m.randF(-ry,ry);"
          "`setAlpha(t,m.alphas=,m.alphad=);"
          "loop{index i=0;while;do:"
          ".explods[`playerno][i].modify(`=,m=,i++,rpg,rpi);"
          "while i<#.explods[`playerno]:}";
      }
      ret true;
    }]);
  }
  bool explodBindTime(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "int i=-1,t=0;";
      if(!`stateParam(param=, "id", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "i=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      bool time = false;
      ~`paraF_t tset = [`paraF_t(data=){
        time = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "t=", ";", 2)) ret false;
        ret true;
      }];
      if(!`stateParam(param=, "time", tset)) ret false;
      if(!time && !`stateParam(param=, "value", tset)) ret false;
      `state.ctrlList[-1].task .= "`trExplodBindTime(i,t);";
      ret true;
    }]);
  }
  bool removeExplod(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool id = false;
      if(!`stateParam(param=, "id", [`paraF_t(data=){
        id = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "`trRemoveExplod(", ");", 2)) ret false;
        ret true;
      }])) ret false;
      if(!id) `state.ctrlList[-1].task .= "`trRemoveExplod(-1);";
      ret true;
    }]);
  }
  bool afterImageSub(&.tbl.NameTable!^/char? param=, ^/char prefix, ^/char obj)
  {
    `state.ctrlList[-1].task .=
      obj .= "aimg.clear();" .= obj .= "aimg.time=1;";
    if(!`stateParam(param=, prefix+"trans", [`paraF_t(data=){
      ^/char text = .s.toLower(data);
      branch{
      cond .s.equ(text, "none"):
        `state.ctrlList[-1].task .= obj .= "aimg.alphas=-1;";
      cond .s.equ(text, "add1"):
        `state.ctrlList[-1].task .=
          obj .= "aimg.alphas=255;" .= obj .= "aimg.alphad=!255;";
      cond .s.equ(text[0..3], "add"):
        `state.ctrlList[-1].task .=
          obj .= "aimg.alphas=255;" .= obj .= "aimg.alphad=255;";
      cond .s.equ(text, "sub"):
        `state.ctrlList[-1].task .=
          obj .= "aimg.alphas=1;" .= obj .= "aimg.alphad=255;";
      else:
        if(!.cfg.IgnoreMostErrors){
          `lasterror = text + "が無効な値です";
          ret false;
        }
      }
      ret true;
    }])) ret false;
    if(!`stateParam(param=, prefix+"time", [`paraF_t(data=){
      if(
        !`fullExpression(
          `state.ctrlList[-1].task=, data=,
          obj+"aimg.time=", ";", 2)) ret false;
      ret true;
    }])) ret false;
    if(!`stateParam(param=, prefix+"length", [`paraF_t(data=){
      if(
        !`fullExpression(
          `state.ctrlList[-1].task=, data=,
          obj+"aimg.length=", ";", 2)) ret false;
      ret true;
    }])) ret false;
    if(!`stateParam(param=, prefix+"timegap", [`paraF_t(data=){
      if(
        !`fullExpression(
          `state.ctrlList[-1].task=, data=,
          obj+"aimg.timegap=.m.max!int?(1,", ");", 2)) ret false;
      ret true;
    }])) ret false;
    if(!`stateParam(param=, prefix+"framegap", [`paraF_t(data=){
      if(
        !`fullExpression(
          `state.ctrlList[-1].task=, data=,
          obj+"aimg.framegap=", ";", 2)) ret false;
      ret true;
    }])) ret false;
    if(!`stateParam(param=, prefix+"palcolor", [`paraF_t(data=){
      if(
        !`fullExpression(
          `state.ctrlList[-1].task=, data=,
          obj+"aimg.setPalcolor(", ");", 2)) ret false;
      ret true;
    }])) ret false;
    if(!`stateParam(param=, prefix+"palinvertall", [`paraF_t(data=){
      if(
        !`fullExpression(
          `state.ctrlList[-1].task=, data=,
          obj+"aimg.setPalinvertall(", ");", 3)) ret false;
      ret true;
    }])) ret false;
    if(!`stateParam(param=, prefix+"palbright", [`paraF_t(data=){
      if(
        !`argExpression(
          `state.ctrlList[-1].task=, data=,
          obj+"aimg.setPalbrightR(", ");", 2)) ret false;
      if(.s.equ(",")<, `tokenizer(data=)){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            obj+"aimg.setPalbrightG(", ");", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              obj+"aimg.setPalbrightB(", ");", 2)) ret false;
        }
      }
      ret true;
    }])) ret false;
    if(!`stateParam(param=, prefix+"palcontrast", [`paraF_t(data=){
      if(
        !`argExpression(
          `state.ctrlList[-1].task=, data=,
          obj+"aimg.setPalcontrastR(", ");", 2)) ret false;
      if(.s.equ(",")<, `tokenizer(data=)){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            obj+"aimg.setPalcontrastG(", ");", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              obj+"aimg.setPalcontrastB(", ");", 2)) ret false;
        }
      }
      ret true;
    }])) ret false;
    if(!`stateParam(param=, prefix+"palpostbright", [`paraF_t(data=){
      if(
        !`argExpression(
          `state.ctrlList[-1].task=, data=,
          obj+"aimg.postbrightr=", ";", 2)) ret false;
      if(.s.equ(",")<, `tokenizer(data=)){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            obj+"aimg.postbrightg=", ";", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              obj+"aimg.postbrightb=", ";", 2)) ret false;
        }
      }
      ret true;
    }])) ret false;
    if(!`stateParam(param=, prefix+"paladd", [`paraF_t(data=){
      if(
        !`argExpression(
          `state.ctrlList[-1].task=, data=,
          obj+"aimg.addr=", ";", 2)) ret false;
      if(.s.equ(",")<, `tokenizer(data=)){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            obj+"aimg.addg=", ";", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              obj+"aimg.addb=", ";", 2)) ret false;
        }
      }
      ret true;
    }])) ret false;
    if(!`stateParam(param=, prefix+"palmul", [`paraF_t(data=){
      if(
        !`argExpression(
          `state.ctrlList[-1].task=, data=,
          obj+"aimg.mulr=", ";", 1)) ret false;
      if(.s.equ(",")<, `tokenizer(data=)){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            obj+"aimg.mulg=", ";", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              obj+"aimg.mulb=", ";", 1)) ret false;
        }
      }
      ret true;
    }])) ret false;
    `state.ctrlList[-1].task .= obj .= "aimg.setupPalfx();";
    ret true;
  }
  bool afterImage(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      ret `afterImageSub(param=, "", "`");
    }]);
  }
  bool afterImageTime(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "if(`aimg.timegap<=0)ret;";
      bool time = false;
      ~`paraF_t tset = [`paraF_t(data=){
        time = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "`aimg.time=", ";", 2)) ret false;
        ret true;
      }];
      if(!`stateParam(param=, "time", tset)) ret false;
      if(!time && !`stateParam(param=, "value", tset)) ret false;
      if(!time) `state.ctrlList[-1].task .= "`aimg.time=0;";
      ret true;
    }]);
  }
  bool makeDust(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "int s=3;";
      if(!`stateParam(param=, "spacing", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "s=.m.max!int?(1,", ");", 2)) ret false;
        ret true;
      }])) ret false;
      `state.ctrlList[-1].task .=
        "if(`stVal.time%s!=s-1)ret;float x=0.0,y=0.0,x2=0.0/0.0,y2=0.0;";
      if(!`stateParam(param=, "pos", [`paraF_t(data=){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "x=", ";", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=, "y=", ";", 1)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "pos2", [`paraF_t(data=){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "x2=", ";", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=, "y2=", ";", 1)) ret false;
        }
        ret true;
      }])) ret false;
      `state.ctrlList[-1].task .= 
        "x-=(float)`sysivar[.iDRAW_OFFSETX];"
        "y-=(float)`sysivar[.iDRAW_OFFSETY];"
        "`makeDust(x,y);"
        "if(!.m.isnan(x2)){"
        "x2-=(float)`sysivar[.iDRAW_OFFSETX];"
        "y2-=(float)`sysivar[.iDRAW_OFFSETY];"
        "`makeDust(x2,y2);}";
      ret true;
    }]);
  }
  bool angleDraw(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "`sysivar[.iSPECIALFLAG]|=.lsANGLEDRAW;";
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "`setAngle(", ");", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "scale", [`paraF_t(data=){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            "`sysfvar[.fANGLESCALEX]*=", ";", 1)) ret false;
        branch{
          ^/char tmp = `tokenizer(data=);
        cond .s.equ(tmp, ","):
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "`sysfvar[.fANGLESCALEY]*=", ";", 1)) ret false;
        cond #tmp == 0:
        else:
         `lasterror = tmp + "が不正です";
          ret false;
        }
        ret true;
      }])) ret false;
      ret true;
    }]);
  }
  bool angleSet(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        `state.ctrlList[-1].task .= "`setAngle(";
        switch(`state.ctrlList[-1].typ){
        case .CtrlTy::AngleAdd:
          `state.ctrlList[-1].task .= "`sysfvar[.fANGLE]+";
        case .CtrlTy::AngleMul:
          `state.ctrlList[-1].task .= "`sysfvar[.fANGLE]*";
        }
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "", ");", 1)) ret false;
        ret true;
      }])) ret false;
      ret true;
    }]);
  }
  bool palFX(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      switch(`state.ctrlList[-1].typ){
      case .CtrlTy::PalFX:
        `state.ctrlList[-1].task .=
          "^&.com.PalFX fx=`palfx;if(#fx==0)fx.new(1);fx~clear2(1);";
      case .CtrlTy::AllPalFX:
        `state.ctrlList[-1].task .= ".sff.allPalFX~clear();";
      case .CtrlTy::BGPalFX:
        `state.ctrlList[-1].task .= ".stage.bgPalFX~clear();";
      }
      ^/char pf =
        `state.ctrlList[-1].typ == .CtrlTy::PalFX
        ? "fx~" : (
          `state.ctrlList[-1].typ == .CtrlTy::BGPalFX
           ? ".stage.bgPalFX~" : ".sff.allPalFX~");
      if(!`stateParam(param=, "time", [`paraF_t(data=){
        `state.ctrlList[-1].task .= pf;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "time=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "color", [`paraF_t(data=){
        `state.ctrlList[-1].task .= pf;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "color=.m.max!float?(0.0,.m.min!float?(1.0,",
            "/256.0));", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "add", [`paraF_t(data=){
        `state.ctrlList[-1].task .= pf;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "addr=", ";", 2)) ret false;
        if(!.s.equ(",")<, `tokenizer(data=)){
          `lasterror = "addの要素が足りません";
          ret false;
        }
        `state.ctrlList[-1].task .= pf;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "addg=", ";", 2)) ret false;
        if(!.s.equ(",")<, `tokenizer(data=)){
          `lasterror = "addの要素が足りません";
          ret false;
        }
        `state.ctrlList[-1].task .= pf;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "addb=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "mul", [`paraF_t(data=){
        `state.ctrlList[-1].task .= pf;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "mulr=", ";", 2)) ret false;
        if(!.s.equ(",")<, `tokenizer(data=)){
          `lasterror = "mulの要素が足りません";
          ret false;
        }
        `state.ctrlList[-1].task .= pf;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "mulg=", ";", 2)) ret false;
        if(!.s.equ(",")<, `tokenizer(data=)){
          `lasterror = "mulの要素が足りません";
          ret false;
        }
        `state.ctrlList[-1].task .= pf;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "mulb=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "sinadd", [`paraF_t(data=){
        `state.ctrlList[-1].task .= pf;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "amplr=", ";", 2)) ret false;
        if(!.s.equ(",")<, `tokenizer(data=)){
          `lasterror = "sinaddの要素が足りません";
          ret false;
        }
        `state.ctrlList[-1].task .= pf;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "amplg=", ";", 2)) ret false;
        if(!.s.equ(",")<, `tokenizer(data=)){
          `lasterror = "sinaddの要素が足りません";
          ret false;
        }
        `state.ctrlList[-1].task .= pf;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "amplb=", ";", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          `state.ctrlList[-1].task .= pf;
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "cycletime=", ";", 2)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "invertall", [`paraF_t(data=){
        `state.ctrlList[-1].task .= pf;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "invertall=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      ret true;
    }]);
  }
  bool trans(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "int t=0;";
      bool addalphaNone = false;
      if(!`stateParam(param=, "trans", [`paraF_t(data=){
        ^/char text = .s.toLower(data);
        branch{
        cond .s.equ(text, "default"):
          `state.ctrlList[-1].task .=
            "t=0;`sysivar[.iSPECIALFLAG]&=!.lsTRANS;";
        cond .s.equ(text, "none"):
          `state.ctrlList[-1].task .=
            "t=1;`sysivar[.iSPECIALFLAG]|=.lsTRANS;";
        cond .s.equ(text, "add"):
          `state.ctrlList[-1].task .=
            "t=2;`sysivar[.iSPECIALFLAG]|=.lsTRANS;`sysivar[.iALPHAS]=255;";
        cond .s.equ(text, "addalpha") || .s.equ(text, "alpha"):
          `state.ctrlList[-1].task .=
            "t=3;`sysivar[.iSPECIALFLAG]|=.lsTRANS;";
            addalphaNone = true;
        cond .s.equ(text, "add1"):
          `state.ctrlList[-1].task .=
            "t=4;`sysivar[.iSPECIALFLAG]|=.lsTRANS;"
            "`sysivar[.iALPHAS]=`sysivar[.iALPHAD]=255;";
        cond .s.equ(text, "sub"):
          `state.ctrlList[-1].task .=
            "t=5;`sysivar[.iSPECIALFLAG]|=.lsTRANS;";
        else:
          `lasterror = text + "が無効な値です";
          ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "alpha", [`paraF_t(data=){
        addalphaNone = false;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            "`sysivar[.iALPHAS]=", ";", 2)) ret false;
        branch{
        cond .s.equ(",")<, `tokenizer(data=):
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "`sysivar[.iALPHAD]=", ";", 2)) ret false;
        else:
          `state.ctrlList[-1].task .= "`sysivar[.iALPHAD]=255;";
        }
        ret true;
      }])) ret false;
      if(addalphaNone) `state.ctrlList[-1].task .= "t=0;";
      `state.ctrlList[-1].task .=
        "`setAlpha(t,`sysivar[.iALPHAS]=,`sysivar[.iALPHAD]=);";
      ret true;
    }]);
  }
  bool offset(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      if(!`stateParam(param=, "x", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "`offsetx=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "y", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "`offsety=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      ret true;
    }]);
  }
  bool hitVelSet(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      if(!`stateParam(param=, "x", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "if(", ")`trHitVelSetX();", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "y", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "if(", ")`trHitVelSetY();", 3)) ret false;
        ret true;
      }])) ret false;
      ret true;
    }]);
  }
  bool hitFallSet(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "int f=-1;float vx=0.0/0.0,vy=0.0/0.0;";
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "f=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      `state.ctrlList[-1].task .= "if(#`stVal.hb.by==0)ret;";
      if(!`stateParam(param=, "xvel", [`paraF_t(data=){
         if(
           !`fullExpression(
             `state.ctrlList[-1].task=, data=, "vx=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "yvel", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "vy=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      `state.ctrlList[-1].task .= "`trHitFallSet(f,vx,vy);";
      ret true;
    }]);
  }
  bool hitFallVel(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "`trHitFallVel();";
      ret true;
    }]);
  }
  bool hitFallDamage(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "`trHitFallDamage();";
      ret true;
    }]);
  }
  bool fallEnvShake(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .=
        ".stage.envShake.time=`stVal.hb.fall.envshake_time;"
        ".stage.envShake.freq=(`stVal.hb.fall.envshake_freq/180.0)*.m.PI;"
        ".stage.envShake.ampl=`stVal.hb.fall.envshake_ampl;"
        ".stage.envShake.phase=`stVal.hb.fall.envshake_phase;"
        ".stage.envShake.setDefPhase();";
      ret true;
    }]);
  }
  bool envColor(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .=
        ".envcol_time=1;"
        ".envcol_r=255;.envcol_g=255;.envcol_b=255;.envcol_under=0;";
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, ".envcol_r=", ";", 2)) ret false;
        if(!.s.equ(",")<, `tokenizer(data=)){
          `lasterror = ",がありません";
          ret false;
        }
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, ".envcol_g=", ";", 2)) ret false;
        if(!.s.equ(",")<, `tokenizer(data=)){
          `lasterror = ",がありません";
          ret false;
        }
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, ".envcol_b=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "time", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".envcol_time=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "under", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".envcol_under=(int)(", ");", 3)) ret false;
        ret true;
      }])) ret false;
      ret true;
    }]);
  }
  bool envShake(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= ".stage.envShake.clear();";
      if(!`stateParam(param=, "time", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".stage.envShake.time=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "ampl", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".stage.envShake.ampl=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "phase", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".stage.envShake.phase=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "freq", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
              ".stage.envShake.freq=.m.max!float?(0.0,(",
              "/180.0)*.m.PI);", 1)) ret false;
        ret true;
      }])) ret false;
      `state.ctrlList[-1].task .= ".stage.envShake.setDefPhase();";
      ret true;
    }]);
  }
  bool width(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool val = false;
      if(!`stateParam(param=, "edge", [`paraF_t(data=){
        val = true;
        if(#.s.trim(data) == 0) ret true;
        if(
          !`argExpression(`state.ctrlList[-1].task=, data=,
            "`setFEdge(", ");", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(`state.ctrlList[-1].task=, data=,
              "`setBEdge(", ");", 1)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "player", [`paraF_t(data=){
        val = true;
        if(#.s.trim(data) == 0) ret true;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            "`setFWidth(", ");", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              "`setBWidth(", ");", 1)) ret false;
        }
        ret true;
      }])) ret false;
      if(!val && !`stateParam(param=, "value", [`paraF_t(data=){
        val = true;
        if(
          !`argExpression(`state.ctrlList[-1].task=, data=,
            "float f=", ";`setFEdge(f);`setFWidth(f);", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(`state.ctrlList[-1].task=, data=,
              "float b=", ";`setBEdge(b);`setBWidth(b);", 1)) ret false;
        }
        ret true;
      }])) ret false;
      if(!val){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      ret true;
    }]);
  }
  bool screenBound(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool val = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        val = true;
        if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=, "branch{cond ",
              ":`sysivar[.iSPECIALFLAG]|=.lsSCREENBOUND;"
              "else:`sysivar[.iSPECIALFLAG]&=!.lsSCREENBOUND;}", 3)) ret false;
        ret true;
      }])) ret false;
      bool mc = false;
      if(!`stateParam(param=, "movecamera", [`paraF_t(data=){
        mc = true;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "branch{cond ",
            ":`sysivar[.iSPECIALFLAG]|=.lsMOVECAMERAX;"
            "else:`sysivar[.iSPECIALFLAG]&=!.lsMOVECAMERAX;}", 3)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=, "branch{cond ",
              ":`sysivar[.iSPECIALFLAG]|=.lsMOVECAMERAY;"
              "else:`sysivar[.iSPECIALFLAG]&=!.lsMOVECAMERAY;}", 3)) ret false;
        }
        ret true;
      }])) ret false;
      if(!val){
        `state.ctrlList[-1].task .=
          "`sysivar[.iSPECIALFLAG]&=!.lsSCREENBOUND;";
      }
      if(!mc){
        `state.ctrlList[-1].task .=
          "`sysivar[.iSPECIALFLAG]&=!(.lsMOVECAMERAX|.lsMOVECAMERAY);";
      }
      ret true;
    }]);
  }
  bool hitAdd(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool value = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        value = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "`trHitAdd(", ");", 2)) ret false;
        ret true;
      }])) ret false;
      if(!value){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      ret true;
    }]);
  }
  bool playSnd(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= .sndstart;
      bool value = false;
      if(!`stateParam(param=, "value", [`paraF_t(data=){
        value = true;
        branch{
          if(#data == 0) else;
        cond data[0] == 'F' || data[0] == 'f':
          `state.ctrlList[-1].task .= "f=true;";
        cond data[0] == 'S' || data[0] == 's':
        else:
          break;
        comm:
          data = data[1..-1];
        }
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "g=", ";", 2)) ret false;
        branch{
        cond .s.equ(",")<, `tokenizer(data=):
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=, "s=", ";", 2)) ret false;
        else:
          `state.ctrlList[-1].task .= "s=0;";
        }
        ret true;
      }])) ret false;
      if(!value){
        `lasterror = "valueが指定されていません";
        ret false;
      }
      if(!`stateParam(param=, "channel", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "ch=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "lowpriority", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "lw=", ";", 3)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "pan", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "p=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "abspan", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "x.new(0);p=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(
        !`stateParam(
          param=, `mver0 == 1 ? "volumescale" : "volume", [`paraF_t(data=)
      {
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "vo=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "freqmul", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "fr=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "loop", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "lp=", ";", 3)) ret false;
        ret true;
      }])) ret false;
      `state.ctrlList[-1].task .= .sndend;
      ret true;
    }]);
  }
  bool stopSnd(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      bool channel = false;
      if(!`stateParam(param=, "channel", [`paraF_t(data=){
        channel = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "branch{int i=.m.min!int?(255,",
            ");cond i<0:.stopAllSound();"
            "else:`sounds.new[i].sound.new(0);}", 2)) ret false;
        ret true;
      }])) ret false;
      if(!channel){
        `lasterror = "channelが指定されていません";
        ret false;
      }
      ret true;
    }]);
  }
  bool sndPan(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .=
        "int ch=-1;float p=0.0;^float x=`sysfvar[.fX...fX+1];";
      bool channel = false;
      if(!`stateParam(param=, "channel", [`paraF_t(data=){
        channel = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "ch=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!channel){
        `lasterror = "channelが指定されていません";
        ret false;
      }
      if(!`stateParam(param=, "pan", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "p=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "abspan", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            "x.new(0);p=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      `state.ctrlList[-1].task .=
        "if((uint)ch<0x100){`sounds.new[ch].chrx=x;"
        "`sounds.new[ch].setPan(p*(float)`facing);}";
      ret true;
    }]);
  }
  bool displayToClipboard(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "^/char text;%&.Var vars;";
      if(`state.ctrlList[-1].typ == .CtrlTy::DisplayToClipboard){
        `state.ctrlList[-1].task .= ".com.clipboardText[`playerno].new(0);";
      }
      bool text = false;
      if(!`stateParam(param=, "text", [`paraF_t(data=){
        text = true;
        branch{
        cond #data >= 2 && data[0] == '"':
          {
            index i = .s.find(\", data[1..-1]);
            if(i < 0) break, else;
            data = data[1 .. i + 1];
          }
        else:
          `lasterror = \""で囲まれていません";
          ret false;
        }
        `state.ctrlList[-1].task .= "text="\" .= data .= \"";";
        ret true;
      }])) ret false;
      if(!text){
        `lasterror = "textが指定されていません";
        ret false;
      }
      if(!`stateParam(param=, "params", [`paraF_t(data=){
        loop{do:
          if(
            !`argExpression(
              `state.ctrlList[-1].task=, data=,
              "vars.new[-1]=", "$.v;", 0)) ret false;
        while .s.equ(",")<, `tokenizer(data=):}
        ret true;
      }])) ret false;
      `state.ctrlList[-1].task .= ".appendToClipboard(`playerno,text,vars);";
      ret true;
    }]);
  }
  bool clearClipboard(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= ".com.clipboardText[`playerno].new(0);";
      ret true;
    }]);
  }
  bool tagIn(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .=
        "^`self p=`trPartner(0)$.c;if(#p==0)ret false;int sn=-1,psn=-1;";
      bool stateno = false;
      if(!`stateParam(param=, "stateno", [`paraF_t(data=){
        stateno = true;
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "sn=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      if(!stateno){
        `lasterror = "statenoが指定されていません";
        ret false;
      }
      if(!`stateParam(param=, "partnerstateno", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=, "psn=", ";", 2)) ret false;
        ret true;
      }])) ret false;
      `state.ctrlList[-1].task .=
        "if(psn<0)ret false;if(sn>=0)`trChangeState(sn,-1,-1);"
        "p~standby=false;p~trChangeState(psn,-1,0);ret true;";
      ret true;
    }]);
  }
  bool tagOut(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "`standby=true;";
      ret true;
    }]);
  }
  bool remapPal(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= "int sg=-1,sn=-1,dg=-1,dn=-1;";
      if(!`stateParam(param=, "source", [`paraF_t(data=){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "sg=", ";", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=, "sn=", ";", 2)) ret false;
        }
        ret true;
      }])) ret false;
      bool dest = false;
      if(!`stateParam(param=, "dest", [`paraF_t(data=){
        dest = true;
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=, "dg=", ";", 2)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=, "dn=", ";", 2)) ret false;
        }
        ret true;
      }])) ret false;
      if(!dest){
        `lasterror = "destが指定されていません";
        ret false;
      }
      `state.ctrlList[-1].task .= "`trRemapPal(sg,sn,dg,dn);";
      ret true;
    }]);
  }
  bool zoom(&.tbl.NameTable!^/char? param=)
  {
    ret `stateSec(param=,[bool(){
      `state.ctrlList[-1].task .= ".com.drawscale=.com.cam.scale;";
      if(!`stateParam(param=, "pos", [`paraF_t(data=){
        if(
          !`argExpression(
            `state.ctrlList[-1].task=, data=,
            ".com.zoomposx=", ";", 1)) ret false;
        if(.s.equ(",")<, `tokenizer(data=)){
          if(
            !`fullExpression(
              `state.ctrlList[-1].task=, data=,
              ".com.zoomposy=", ";", 1)) ret false;
        }
        ret true;
      }])) ret false;
      if(!`stateParam(param=, "scale", [`paraF_t(data=){
        if(
          !`fullExpression(
            `state.ctrlList[-1].task=, data=,
            ".com.drawscale=", ";", 1)) ret false;
        ret true;
      }])) ret false;
      ret true;
    }]);
  }
  ^/char stateBulid(%char buf=, ^/char def, ^/char st=)
  {:<-
    public bool statedef(^/char sec, ^/char name, ^/char data)
    {
      ret false;
    }
    public bool state(^/char sec, ^/char name, ^/char data)
    {
      branch{
        ^/char text = data;
      cond .s.equ(name, "type"):
        branch{
          ^char s = .s.toLower(data);
          if(`state.ctrlList[-1].typ != .CtrlTy::Unknown){
            if(.cfg.IgnoreMostErrors) break, break;
            `lasterror = "typeが二重指定されています";
            ret false;
          }
        cond .s.equ(s, "changestate"):
          `state.ctrlList[-1].typ = .CtrlTy::ChangeState;
        cond .s.equ(s, "selfstate"):
          `state.ctrlList[-1].typ = .CtrlTy::SelfState;
        cond .s.equ(s, "changeanim"):
          `state.ctrlList[-1].typ = .CtrlTy::ChangeAnim;
        cond .s.equ(s, "changeanim2"):
          `state.ctrlList[-1].typ = .CtrlTy::ChangeAnim2;
        cond .s.equ(s, "posset"):
          `state.ctrlList[-1].typ = .CtrlTy::PosSet;
        cond .s.equ(s, "posadd"):
          `state.ctrlList[-1].typ = .CtrlTy::PosAdd;
        cond .s.equ(s, "velset"):
          `state.ctrlList[-1].typ = .CtrlTy::VelSet;
        cond .s.equ(s, "veladd"):
          `state.ctrlList[-1].typ = .CtrlTy::VelAdd;
        cond .s.equ(s, "velmul"):
          `state.ctrlList[-1].typ = .CtrlTy::VelMul;
        cond .s.equ(s, "varset"):
          `state.ctrlList[-1].typ = .CtrlTy::VarSet;
        cond .s.equ(s, "varadd"):
          `state.ctrlList[-1].typ = .CtrlTy::VarAdd;
        cond .s.equ(s, "parentvarset"):
          `state.ctrlList[-1].typ = .CtrlTy::ParentVarSet;
        cond .s.equ(s, "parentvaradd"):
          `state.ctrlList[-1].typ = .CtrlTy::ParentVarAdd;
        cond .s.equ(s, "varrangeset"):
          `state.ctrlList[-1].typ = .CtrlTy::VarRangeSet;
        cond .s.equ(s, "varrandom"):
          `state.ctrlList[-1].typ = .CtrlTy::VarRandom;
        cond .s.equ(s, "turn"):
          `state.ctrlList[-1].typ = .CtrlTy::Turn;
        cond .s.equ(s, "ctrlset"):
          `state.ctrlList[-1].typ = .CtrlTy::CtrlSet;
        cond .s.equ(s, "statetypeset"):
          `state.ctrlList[-1].typ = .CtrlTy::StateTypeSet;
        cond .s.equ(s, "sprpriority"):
          `state.ctrlList[-1].typ = .CtrlTy::SprPriority;
        cond .s.equ(s, "hitdef"):
          `state.ctrlList[-1].typ = .CtrlTy::HitDef;
        cond .s.equ(s, "projectile"):
          `state.ctrlList[-1].typ = .CtrlTy::Projectile;
        cond .s.equ(s, "reversaldef"):
          `state.ctrlList[-1].typ = .CtrlTy::ReversalDef;
        cond .s.equ(s, "attackdist"):
          `state.ctrlList[-1].typ = .CtrlTy::AttackDist;
        cond .s.equ(s, "hitoverride"):
          `state.ctrlList[-1].typ = .CtrlTy::HitOverride;
        cond .s.equ(s, "pause"):
          `state.ctrlList[-1].typ = .CtrlTy::Pause;
        cond .s.equ(s, "superpause"):
          `state.ctrlList[-1].typ = .CtrlTy::SuperPause;
        cond .s.equ(s, "lifeadd"):
          `state.ctrlList[-1].typ = .CtrlTy::LifeAdd;
        cond .s.equ(s, "lifeset"):
          `state.ctrlList[-1].typ = .CtrlTy::LifeSet;
        cond .s.equ(s, "poweradd"):
          `state.ctrlList[-1].typ = .CtrlTy::PowerAdd;
        cond .s.equ(s, "powerset"):
          `state.ctrlList[-1].typ = .CtrlTy::PowerSet;
        cond .s.equ(s, "targetlifeadd"):
          `state.ctrlList[-1].typ = .CtrlTy::TargetLifeAdd;
        cond .s.equ(s, "targetbind"):
          `state.ctrlList[-1].typ = .CtrlTy::TargetBind;
        cond .s.equ(s, "targetstate"):
          `state.ctrlList[-1].typ = .CtrlTy::TargetState;
        cond .s.equ(s, "targetvelset"):
          `state.ctrlList[-1].typ = .CtrlTy::TargetVelSet;
        cond .s.equ(s, "targetveladd"):
          `state.ctrlList[-1].typ = .CtrlTy::TargetVelAdd;
        cond .s.equ(s, "targetfacing"):
          `state.ctrlList[-1].typ = .CtrlTy::TargetFacing;
        cond .s.equ(s, "targetpoweradd"):
          `state.ctrlList[-1].typ = .CtrlTy::TargetPowerAdd;
        cond .s.equ(s, "targetdrop"):
          `state.ctrlList[-1].typ = .CtrlTy::TargetDrop;
        cond .s.equ(s, "hitby"):
          `state.ctrlList[-1].typ = .CtrlTy::HitBy;
        cond .s.equ(s, "nothitby"):
          `state.ctrlList[-1].typ = .CtrlTy::NotHitBy;
        cond .s.equ(s, "attackmulset"):
          `state.ctrlList[-1].typ = .CtrlTy::AttackMulSet;
        cond .s.equ(s, "defencemulset"):
          `state.ctrlList[-1].typ = .CtrlTy::DefenceMulSet;
        cond .s.equ(s, "movehitreset"):
          `state.ctrlList[-1].typ = .CtrlTy::MoveHitReset;
        cond .s.equ(s, "assertspecial"):
          `state.ctrlList[-1].typ = .CtrlTy::AssertSpecial;
        cond .s.equ(s, "posfreeze"):
          `state.ctrlList[-1].typ = .CtrlTy::PosFreeze;
        cond .s.equ(s, "playerpush"):
          `state.ctrlList[-1].typ = .CtrlTy::PlayerPush;
        cond .s.equ(s, "gravity"):
          `state.ctrlList[-1].typ = .CtrlTy::Gravity;
        cond .s.equ(s, "bindtoparent"):
          `state.ctrlList[-1].typ = .CtrlTy::BindToParent;
        cond .s.equ(s, "bindtoroot"):
          `state.ctrlList[-1].typ = .CtrlTy::BindToRoot;
        cond .s.equ(s, "bindtotarget"):
          `state.ctrlList[-1].typ = .CtrlTy::BindToTarget;
        cond .s.equ(s, "helper"):
          `state.ctrlList[-1].typ = .CtrlTy::Helper;
        cond .s.equ(s, "destroyself"):
          `state.ctrlList[-1].typ = .CtrlTy::DestroySelf;
        cond .s.equ(s, "explod"):
          `state.ctrlList[-1].typ = .CtrlTy::Explod;
        cond .s.equ(s, "gamemakeanim"):
          `state.ctrlList[-1].typ = .CtrlTy::GameMakeAnim;
        cond .s.equ(s, "modifyexplod"):
          `state.ctrlList[-1].typ = .CtrlTy::ModifyExplod;
        cond .s.equ(s, "explodbindtime"):
          `state.ctrlList[-1].typ = .CtrlTy::ExplodBindTime;
        cond .s.equ(s, "removeexplod"):
          `state.ctrlList[-1].typ = .CtrlTy::RemoveExplod;
        cond .s.equ(s, "afterimage"):
          `state.ctrlList[-1].typ = .CtrlTy::AfterImage;
        cond .s.equ(s, "afterimagetime"):
          `state.ctrlList[-1].typ = .CtrlTy::AfterImageTime;
        cond .s.equ(s, "makedust"):
          `state.ctrlList[-1].typ = .CtrlTy::MakeDust;
        cond .s.equ(s, "angledraw"):
          `state.ctrlList[-1].typ = .CtrlTy::AngleDraw;
        cond .s.equ(s, "angleadd"):
          `state.ctrlList[-1].typ = .CtrlTy::AngleAdd;
        cond .s.equ(s, "anglemul"):
          `state.ctrlList[-1].typ = .CtrlTy::AngleMul;
        cond .s.equ(s, "angleset"):
          `state.ctrlList[-1].typ = .CtrlTy::AngleSet;
        cond .s.equ(s, "palfx"):
          `state.ctrlList[-1].typ = .CtrlTy::PalFX;
        cond .s.equ(s, "allpalfx"):
          `state.ctrlList[-1].typ = .CtrlTy::AllPalFX;
        cond .s.equ(s, "bgpalfx"):
          `state.ctrlList[-1].typ = .CtrlTy::BGPalFX;
        cond .s.equ(s, "trans"):
          `state.ctrlList[-1].typ = .CtrlTy::Trans;
        cond .s.equ(s, "offset"):
          `state.ctrlList[-1].typ = .CtrlTy::Offset;
        cond .s.equ(s, "hitvelset"):
          `state.ctrlList[-1].typ = .CtrlTy::HitVelSet;
        cond .s.equ(s, "hitfallset"):
          `state.ctrlList[-1].typ = .CtrlTy::HitFallSet;
        cond .s.equ(s, "hitfallvel"):
          `state.ctrlList[-1].typ = .CtrlTy::HitFallVel;
        cond .s.equ(s, "hitfalldamage"):
          `state.ctrlList[-1].typ = .CtrlTy::HitFallDamage;
        cond .s.equ(s, "fallenvshake"):
          `state.ctrlList[-1].typ = .CtrlTy::FallEnvShake;
        cond .s.equ(s, "envcolor"):
          `state.ctrlList[-1].typ = .CtrlTy::EnvColor;
        cond .s.equ(s, "envshake"):
          `state.ctrlList[-1].typ = .CtrlTy::EnvShake;
        cond .s.equ(s, "width"):
          `state.ctrlList[-1].typ = .CtrlTy::Width;
        cond .s.equ(s, "screenbound"):
          `state.ctrlList[-1].typ = .CtrlTy::ScreenBound;
        cond .s.equ(s, "hitadd"):
          `state.ctrlList[-1].typ = .CtrlTy::HitAdd;
        cond .s.equ(s, "playsnd"):
          `state.ctrlList[-1].typ = .CtrlTy::PlaySnd;
        cond .s.equ(s, "stopsnd"):
          `state.ctrlList[-1].typ = .CtrlTy::StopSnd;
        cond .s.equ(s, "sndpan"):
          `state.ctrlList[-1].typ = .CtrlTy::SndPan;
        cond .s.equ(s, "displaytoclipboard"):
          `state.ctrlList[-1].typ = .CtrlTy::DisplayToClipboard;
        cond .s.equ(s, "appendtoclipboard"):
          `state.ctrlList[-1].typ = .CtrlTy::AppendToClipboard;
        cond .s.equ(s, "clearclipboard"):
          `state.ctrlList[-1].typ = .CtrlTy::ClearClipboard;
        cond .s.equ(s, "tagin"):
          `state.ctrlList[-1].typ = .CtrlTy::TagIn;
        cond .s.equ(s, "tagout"):
          `state.ctrlList[-1].typ = .CtrlTy::TagOut;
        cond .s.equ(s, "forcefeedback"):
          `state.ctrlList[-1].typ = .CtrlTy::ForceFeedback;
        cond .s.equ(s, "victoryquote"):
          `state.ctrlList[-1].typ = .CtrlTy::VictoryQuote;
        cond .s.equ(s, "remappal"):
          `state.ctrlList[-1].typ = .CtrlTy::RemapPal;
        cond .s.equ(s, "zoom"):
          `state.ctrlList[-1].typ = .CtrlTy::Zoom;
        cond .s.equ(s, "null"):
          `state.ctrlList[-1].typ = .CtrlTy::Null;
        else:
          `lasterror = data + "が無効な値です";
          ret false;
        }
      cond .s.equ(name, "triggerall"):
        if(#`state.ctrlList[-1].triggerall > 0){
          `state.ctrlList[-1].triggerall .= "&&";
        }
        if(
          !`fullExpression(
            `state.ctrlList[-1].triggerall=, text=, "", "", 3)) ret false;
      cond .s.equ(name[0..7], "trigger"):
        {
          int idx;
          if(!.com.readDigit(idx=, name[7..-1]) || idx <= 0 || idx > 65536){
            if(.cfg.IgnoreMostErrors) break, break;
            `lasterror = "トリガー名が不正です";
            ret false;
          }
          idx--;
          %char buf;
          if(#`state.ctrlList[-1].trigger.new[idx] > 0){
            buf .= "&&";
          }
          if(!`fullExpression(buf=, text=, "", "", 3)){
            if(!.cfg.IgnoreMostErrors)  ret false;
            loop{index i = 0; while; do:
              if(#`state.ctrlList[-1].trigger[i] == 0) break;
              i++;
            while i < idx:
              ret false;
            }
            break, break;
          }
          `state.ctrlList[-1].trigger[idx] .= buf;
        }
      cond .s.equ(name, "persistent"):
        if(`state.no >= 0 && !`state.i){
          `state.persistent = .com.atonOF!`state.persistent.self?(text);
          if(`state.persistent > 128) `state.persistent = 1;
        }
      cond .s.equ(name, "ignorehitpause"):
        `state.ignorehitpause = .com.atonOF!`state.ignorehitpause.self?(text);
        if(`state.ignorehitpause < 0) `state.ignorehitpause = 1;
      else:
        if(`state.ctrlList[-1].typ == .CtrlTy::Unknown){
          `lasterror = "typeが指定されていません";
          ret false;
        }
        switch(`state.ctrlList[-1].typ){
        case .CtrlTy::VictoryQuote:
          branch{
          cond .s.equ(name, "value"):
            if(!`fullExpression(`state.ctrlList[-1].task=, text=, "", ";", 2)){
              ret false;
            }
          else:
            break, default;
          }
        case .CtrlTy::ForceFeedback:
        case .CtrlTy::Null:
        default:
          `lasterror = "無効なキー名です";
          ret false;
        }
      }
      ret true;
    }
    ^/char error;
    ^char mainbuf;
    bool unicode = false;
    if(
      #.com.loadFile(def, st=)=>error <, [^/char(^/char f){
        ret
          #.com.loadText(f, unicode=)=>mainbuf > 0
          ? "" : .com.FileReadError;
      }] > 0)
    {
      ret def + ":"\r\n + error;
    }
    ^/char fn = st;
    %^/char lines = .com.splitLines(mainbuf);
    .s.each!^/char?([void(^/char l=){l=.s.trim(l);}], lines);
    &.tbl.IntTable!long, bool? stnoTable;
    bool existInThisFile(
      int no, bool iflag, &.tbl.IntTable!long, bool? stnoTable=)
    {
      ret #stnoTable.get((long)iflag << 32 | no) > 0;
    }
    loop{
      index i = 0;
      bool stateExist = false;
      ^/char line;
      %char fname;
      while;
    do:
      line = .s.trim(lines[i][0.. .s.find(";", lines[i])]);
      if(#line <= 0 || line[0] != '[' || line[-1] != ']') continue;
      line = .s.toLower(line);
      if(!.s.equ("statedef ", line[1..10])) continue;
      line = .s.trim(line[10..-1]);
      `state.i = .s.equ("-i", line[0..2]);
      if(`state.i){
        %char tmp .= line[1..-1];
        tmp[0] = '0';
        line = tmp;
      }
      `state.no = .com.atonOF!`state.no.self?(line);
      if(existInThisFile(`state.no, `state.i, stnoTable=)) continue;
      stateExist = `existState(`state.no, `state.i);
      fname.new(0);
      branch{
      cond `state.i:
        fname .= "s_I" .= ''`state.no;
      cond `state.no < 0:
        {
          ^char tmp;
          fname .= "s_" .= (tmp=''`state.no)$tmp[1..-1];
        }
      else:
        fname .= 's' .= ''`state.no;
      }
      fname .= '_' .= ''`playerno .= 'P';
      stnoTable.set((long)`state.i << 32 | `state.no, `t);
      if(!stateExist){
        `stnoList.new[-1].set(`state.no, `state.i, fname);
        `stnoTable.set((long)`state.i << 32 | `state.no, `t);
      }
      `state.clear();
      i++;
      if(
        .s.equ(fn[0..4], "ssz/") && .s.find("..", fn) < 0
        && .s.equ(lines[i], "SSZ_CODE:"))
      {
        i++;
        loop{
          ^/char tmp;
          while;
        do:
          if(!stateExist){
            tmp = .s.join(''`state.no)<, .s.split("##", lines[i]);
            buf .= .s.join(''`playerno)<, .s.split("@@", tmp) .= \r\n;
          }
          i++;
        while (#lines[i] <= 0 || lines[i][0] != '[') && i < #lines:}
        break, while;
      }
      if(!`parse!`stateBulid:<-statedef?(lines, i=, "")){
        ret .errmes(fn, lines[i], i, `errorexp+\r\n+`lasterror);
      }
      loop{
        int cn;
        %char cbuf, dbuf;
        &.tbl.NameTable!^/char? tbl;
        ^^/char item;
        if(!stateExist){
          buf .=
            "void c.Char::" .= fname .= "()"\r\n
            "{"\r\n
            \t"bool nh = !`isHitPaused();"\r\n;
        }
        continue;
      do:
        line = .s.trim(lines[i][0.. .s.find(";", lines[i])]);
        if(#line <= 0 || line[0] != '[' || line[-1] != ']') continue;
        line = .s.toLower(line);
        if(!.s.equ("state ", line[1..7])){
          i--;
          break, break;
        }
        `state.tmpreset();
        `state.ctrlList.new[-1];
        i++;
        if(!`parse!`stateBulid:<-state?(lines, i=, "")){
          ret .errmes(fn, lines[i], i, `errorexp+\r\n+`lasterror);
        }
        if(
          #`state.ctrlList[-1].trigger == 0
          || #`state.ctrlList[-1].trigger[0] == 0)
        {
          ret .errmes(fn, lines[i], i, "trigger1がありません");
        }
        if(stateExist) continue;
        buf .= \t"if(";
        branch{
        cond `state.ignorehitpause <= 0:
          buf .= "nh&&";
        cond
          `state.no >= 0 && !`state.i && (
            `state.ctrlList[-1].typ == .CtrlTy::ChangeState
            || `state.ctrlList[-1].typ == .CtrlTy::SelfState
            || `state.ctrlList[-1].typ == .CtrlTy::TagIn
            || `state.ctrlList[-1].typ == .CtrlTy::TagOut)
          :
          buf .=
            "(nh||!!`stVal.wakegawakaranai[" .= ''`playerno .= "]["
            .= ''.chr.wakewakaLength[`playerno] .= "])&&";
          .chr.wakewakaLength[`playerno]++;
        }
        if(`state.persistent != 1){
          buf .= "--`stVal.ps[" .= ''(#`state.ctrlList-1) .= "].p<=0&&";
        }
        branch{
        cond #`state.ctrlList[-1].triggerall > 0:
          branch{
          cond #`state.ctrlList[-1].triggerall > 384:
            item.new(0);
          else:
            item = tbl.get(`state.ctrlList[-1].triggerall);
          }
          if(#item == 0){
            %char tmp;
            tmp .= fname .= 'c' .= ''(#`state.ctrlList-1) .= "ta";
            item.new(1);
            item<> = tmp;
            tbl.set(`state.ctrlList[-1].triggerall, item);
            cbuf .=
              "bool c.Char::" .= item<> .= "()"\r\n
              "{"\r\n
              \t"ret "
              .= `state.ctrlList[-1].triggerall .= ";"\r\n
              "}"\r\n;
          }
          buf .= '`' .= item<> .= "()&&(";
        else:
          buf .= '(';
        }
        loop{index m = 0; while; do:
          if(#`state.ctrlList[-1].trigger[m] == 0) break;
          branch{
          cond #`state.ctrlList[-1].trigger > 1024 && (m & 1023) == 0:
            if(m != 0){
              buf .= ")||";
            }
            buf .= '(';
          cond m != 0:
            buf .= "||";
          }
          branch{
          cond #`state.ctrlList[-1].trigger[m] > 384:
            item.new(0);
          else:
            item = tbl.get(`state.ctrlList[-1].trigger[m]);
          }
          if(#item == 0){
            %char tmp;
            tmp .= fname .= 'c' .= ''(#`state.ctrlList-1) .= 't' .= ''(m+1);
            item.new(1);
            item<> = tmp;
            tbl.set(`state.ctrlList[-1].trigger[m], item);
            cbuf .=
              "bool c.Char::" .= item<> .= "()"\r\n
              "{"\r\n
              \t"ret "
              .= `state.ctrlList[-1].trigger[m] .= ";"\r\n
              "}"\r\n;
          }
          buf .= '`' .= item<> .= "()";
          m++;
        while m < #`state.ctrlList[-1].trigger:
        break:
          if(#`state.ctrlList[-1].trigger > 1024) buf .= ')';
        }
        buf .= "))";
        dbuf.new(0);
        if(`state.persistent != 1){
          if(`state.persistent <= 0) `state.persistent = .consts.int_t::MAX;
          dbuf .=
            "`stVal.ps[" .= ''(#`state.ctrlList-1) .= "].p="
            .= ''`state.persistent .= ';';
        }
        dbuf .= `state.ctrlList[-1].task;
        item = tbl.get(dbuf);
        if(#item == 0){
          %char tmp .= fname .= 'c' .= ''(#`state.ctrlList-1);
          item.new(1);
          item<> = tmp;
          tbl.set(dbuf, item);
          cbuf .= `state.ctrlList[-1].typ == .CtrlTy::TagIn ? "bool" : "void";
          cbuf .=
            " c.Char::" .= item<> .= (
              `state.ctrlList[-1].typ == .CtrlTy::Explod
              ? "(int ih)" :  "()")
            .= \r\n"{"\r\n\t .= dbuf .= \r\n"}"\r\n;
        }
        branch{
        cond<cs>
          `state.ctrlList[-1].typ == .CtrlTy::ChangeState
          || `state.ctrlList[-1].typ == .CtrlTy::SelfState
          || `state.ctrlList[-1].typ == .CtrlTy::TagIn
          || `state.ctrlList[-1].typ == .CtrlTy::TagOut
          :
          buf .= '{';
        cond<ds>
          `mver0 == 1 && `state.ctrlList[-1].typ == .CtrlTy::DestroySelf
          :
          buf .= '{';
        comm:
          if(`state.ctrlList[-1].typ == .CtrlTy::TagIn) buf .= "if(";
          buf .= '`' .= item<>;
          branch{
          cond `state.ctrlList[-1].typ == .CtrlTy::Explod:
            buf .= '(' .= ''`state.ignorehitpause .= ')';
          else:
            buf .= "()";
          }
          buf .= `state.ctrlList[-1].typ == .CtrlTy::TagIn ? ')' : ';';
        diff<cs>:
           buf .= "ret;}";
        diff<ds>:
           buf .= "if(`ls(.lsDESTROY))ret;}";
        comm:
           buf .= \r\n;
        }
      continue:
        i++;
      while i < #lines:
      break:
        if(!stateExist){
          buf .= "}"\r\n .= cbuf;
          if(`state.no >= 0 && !`state.i){
            buf .=
              "void c.Char::" .= fname .= "Init()"\r\n
              "{"\r\n;
            switch(`state.typ){
            case .chr.StTy::S:
              buf .= \t"`stVal.typ = .StTy::S;"\r\n;
            case .chr.StTy::C:
              buf .= \t"`stVal.typ = .StTy::C;"\r\n;
            case .chr.StTy::A:
              buf .= \t"`stVal.typ = .StTy::A;"\r\n;
            case .chr.StTy::L:
              buf .= \t"`stVal.typ = .StTy::L;"\r\n;
            }
            switch(`state.mov){
            case .chr.MovTy::I:
              buf .= \t"`stVal.mov = .MovTy::I;"\r\n;
            case .chr.MovTy::A:
              buf .= \t"`stVal.mov = .MovTy::A;"\r\n;
            case .chr.MovTy::H:
              buf .= \t"`stVal.mov = .MovTy::H;"\r\n;
            }
            switch(`state.phy){
            case .chr.StTy::S:
              buf .= \t"`stVal.phy = .StTy::S;"\r\n;
            case .chr.StTy::C:
              buf .= \t"`stVal.phy = .StTy::C;"\r\n;
            case .chr.StTy::A:
              buf .= \t"`stVal.phy = .StTy::A;"\r\n;
            case .chr.StTy::N:
              buf .= \t"`stVal.phy = .StTy::N;"\r\n;
            }
            if(#`state.ctrlList > 0){
              buf .=
                \t"`stVal.ps.new("
                .= ''#`state.ctrlList .= ");"\r\n
                \t"loop{index i = 0; do:"\r\n
                \t\t"`stVal.ps[i].p = 0;"\r\n
                \t"while ++i < " .= ''#`state.ctrlList .= ":"\r\n
                \t"}"\r\n;
            }
            if(#`state.deftask > 0){
              buf .= '\t' .= `state.deftask .= \r\n;
            }
            buf .= "}"\r\n;
          }
        }
      }
    continue:
      i++;
    while i < #lines:}
    ret "";
  }
  public ^/char build(int no, ^/char def, ^/char code=)
  {:<-
    void files(^^/char lines, bool unicode)
    {
      bool oVer = `mver0 != 1;
      ^/char f(^/char str)
      {
        ^/char s = .com.readFileName(str, `unicode);
        if(`oVer) s = s[0...s.cFind(" "\t, s)];
        ret s;
      }
      loop{index i = 0; while; do:
        {
          ^/char sec = lines[i];
          ^/char secname = .com.sectionName(sec=);
          if(#secname == 0) break;
          i++;
          &.com.Section sc.parse(lines, i=);
          if(!.s.equ(secname, "files")) break;
          ^/char data;
          if(#(data = sc.get("cmd")) > 0) `cmd = f(data);
          if(#(data = sc.get("cns")) > 0) `cns = f(data);
          if(#(data = sc.get("st")) > 0) `st.new[0] = f(data);
          if(#(data = sc.get("st0")) > 0) `st.new[1] = f(data);
          if(#(data = sc.get("st1")) > 0) `st.new[2] = f(data);
          if(#(data = sc.get("st2")) > 0) `st.new[3] = f(data);
          if(#(data = sc.get("st3")) > 0) `st.new[4] = f(data);
          if(#(data = sc.get("st4")) > 0) `st.new[5] = f(data);
          if(#(data = sc.get("st5")) > 0) `st.new[6] = f(data);
          if(#(data = sc.get("st6")) > 0) `st.new[7] = f(data);
          if(#(data = sc.get("st7")) > 0) `st.new[8] = f(data);
          if(#(data = sc.get("st8")) > 0) `st.new[9] = f(data);
          if(#(data = sc.get("st9")) > 0) `st.new[10] = f(data);
          if(#(data = sc.get("stcommon")) > 0) `stcommon = f(data);
          ret;
        }
        i++;
      while i < #lines:}
    }
    void data(&.com.Section sc=)
    {
      ^/char data;
      if(#(data = sc.get("life")) > 0) `c.d.life = .com.atonOF!int?(data);
      if(#(data = sc.get("power")) > 0) `c.d.power = .com.atonOF!int?(data);
      if(#(data = sc.get("attack")) > 0) `c.d.attack = .com.atonOF!int?(data);
      if(#(data = sc.get("defence")) > 0){
        `c.d.defence = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("fall.defence_up")) > 0){
        `c.d.fall_defence_mul = (.com.atof(data)+100.0) / 100.0;
      }
      if(#(data = sc.get("liedown.time")) > 0){
        `c.d.liedown_time = .m.max!int?(1)<, .com.atonOF!int?(data);
      }
      if(#(data = sc.get("airjuggle")) > 0){
        `c.d.airjuggle = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("sparkno")) > 0){
        `c.d.sparkno = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("guard.sparkno")) > 0){
        `c.d.guard_sparkno = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("ko.echo")) > 0){
        `c.d.ko_echo = .com.atonOF!int?(data);
      }
      branch{
      cond `mver0 == 1:
        if(#(data = sc.get("volumescale")) > 0){
          `c.d.volume = (.com.aton!short?(data)*64 / 25);
        }
      else:
        if(#(data = sc.get("volume")) > 0){
          `c.d.volume = .com.aton!short?(data) + 256;
        }
      }
      if(#(data = sc.get("intpersistindex")) > 0){
        `c.d.intpersistindex = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("floatpersistindex")) > 0){
        `c.d.floatpersistindex = .com.atonOF!int?(data);
      }
    }
    void size(&.com.Section sc=)
    {
      ^/char data;
      if(#(data = sc.get("xscale")) > 0) `c.s.xscale = .com.atof(data);
      if(#(data = sc.get("yscale")) > 0) `c.s.yscale = .com.atof(data);
      if(#(data = sc.get("ground.back")) > 0){
        `c.s.ground_back = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("ground.front")) > 0){
        `c.s.ground_front = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("air.back")) > 0){
        `c.s.air_back = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("air.front")) > 0){
        `c.s.air_front = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("height")) > 0) `c.s.height = .com.atonOF!int?(data);
      if(#(data = sc.get("attack.dist")) > 0){
        `c.s.attack_dist = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("proj.attack.dist")) > 0){
        `c.s.proj_attack_dist = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("proj.doscale")) > 0){
        `c.s.proj_doscale = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("head.pos")) > 0){
        .com.readPair!int?(`c.s.head_posx=, `c.s.head_posy=, data);
      }
      if(#(data = sc.get("mid.pos")) > 0){
        .com.readPair!int?(`c.s.mid_posx=, `c.s.mid_posy=, data);
      }
      if(#(data = sc.get("shadowoffset")) > 0){
        `c.s.shadowoffset = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("draw.offset")) > 0){
        .com.readPair!int?(`c.s.draw_offsetx=, `c.s.draw_offsety=, data);
      }
      if(#(data = sc.get("z.width")) > 0){
        `c.s.z_width = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("attack.z.width")) > 0){
        .com.readPair!int?(
          `c.s.attack_z_width_front=, `c.s.attack_z_width_back=, data);
      }
    }
    void velocity(&.com.Section sc=)
    {
      ^/char data;
      if(#(data = sc.get("walk.fwd")) > 0) `c.v.walk_fwd = .com.atof(data);
      if(#(data = sc.get("walk.back")) > 0) `c.v.walk_back = .com.atof(data);
      if(#(data = sc.get("run.fwd")) > 0){
        .com.readPair!float?(`c.v.run_fwdx=, `c.v.run_fwdy=, data);
      }
      if(#(data = sc.get("run.back")) > 0){
        .com.readPair!float?(`c.v.run_backx=, `c.v.run_backy=, data);
      }
      if(#(data = sc.get("jump.neu")) > 0){
        .com.readPair!float?(`c.v.jump_neux=, `c.v.jump_neuy=, data);
      }
      if(#(data = sc.get("jump.back")) > 0) `c.v.jump_back = .com.atof(data);
      if(#(data = sc.get("jump.fwd")) > 0) `c.v.jump_fwd = .com.atof(data);
      if(#(data = sc.get("runjump.back")) > 0){
        .com.readPair!float?(`c.v.runjump_backx=, `c.v.runjump_backy=, data);
      }
      if(#(data = sc.get("runjump.fwd")) > 0){
        .com.readPair!float?(`c.v.runjump_fwdx=, `c.v.runjump_fwdy=, data);
      }
      if(#(data = sc.get("airjump.neu")) > 0){
        .com.readPair!float?(`c.v.airjump_neux=, `c.v.airjump_neuy=, data);
      }
      if(#(data = sc.get("airjump.back")) > 0){
        `c.v.airjump_back = .com.atof(data);
      }
      if(#(data = sc.get("airjump.fwd")) > 0){
        `c.v.airjump_fwd = .com.atof(data);
      }
      if(#(data = sc.get("air.gethit.groundrecover")) > 0){
        .com.readPair!float?(
          `c.v.air_gethit_groundrecoverx=,
          `c.v.air_gethit_groundrecovery=, data);
      }
      if(#(data = sc.get("air.gethit.airrecover.mul")) > 0){
        .com.readPair!float?(
          `c.v.air_gethit_airrecover_mulx=,
          `c.v.air_gethit_airrecover_muly=, data);
      }
      if(#(data = sc.get("air.gethit.airrecover.add")) > 0){
        .com.readPair!float?(
          `c.v.air_gethit_airrecover_addx=,
          `c.v.air_gethit_airrecover_addy=, data);
      }
      if(#(data = sc.get("air.gethit.airrecover.back")) > 0){
        `c.v.air_gethit_airrecover_back = .com.atof(data);
      }
      if(#(data = sc.get("air.gethit.airrecover.fwd")) > 0){
        `c.v.air_gethit_airrecover_fwd = .com.atof(data);
      }
      if(#(data = sc.get("air.gethit.airrecover.up")) > 0){
        `c.v.air_gethit_airrecover_up = .com.atof(data);
      }
      if(#(data = sc.get("air.gethit.airrecover.down")) > 0){
        `c.v.air_gethit_airrecover_down = .com.atof(data);
      }
      if(#(data = sc.get("walk.up.x")) > 0) `c.v.walk_up_x = .com.atof(data);
      if(#(data = sc.get("walk.down.x")) > 0){
        `c.v.walk_down_x = .com.atof(data);
      }
      if(#(data = sc.get("run.up.x")) > 0) `c.v.run_up_x = .com.atof(data);
      if(#(data = sc.get("run.up.y")) > 0) `c.v.run_up_y = .com.atof(data);
      if(#(data = sc.get("run.down.x")) > 0) `c.v.run_down_x = .com.atof(data);
      if(#(data = sc.get("run.down.y")) > 0) `c.v.run_down_y = .com.atof(data);
      if(#(data = sc.get("jump.up.x")) > 0) `c.v.jump_up_x = .com.atof(data);
      if(#(data = sc.get("jump.down.x")) > 0){
        `c.v.jump_down_x = .com.atof(data);
      }
      if(#(data = sc.get("runjump.up.x")) > 0){
        `c.v.runjump_up_x = .com.atof(data);
      }
      if(#(data = sc.get("runjump.down.x")) > 0){
        `c.v.runjump_down_x = .com.atof(data);
      }
      if(#(data = sc.get("airjump.up.x")) > 0){
        `c.v.airjump_up_x = .com.atof(data);
      }
      if(#(data = sc.get("airjump.down.x")) > 0){
        `c.v.airjump_down_x = .com.atof(data);
      }
    }
    void movement(&.com.Section sc=)
    {
      ^/char data;
      if(#(data = sc.get("airjump.num")) > 0){
        `c.m.airjump_num = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("airjump.height")) > 0){
        `c.m.airjump_height = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("yaccel")) > 0) `c.m.yaccel = .com.atof(data);
      if(#(data = sc.get("stand.friction")) > 0){
        `c.m.stand_friction = .com.atof(data);
      }
      if(#(data = sc.get("crouch.friction")) > 0){
        `c.m.crouch_friction = .com.atof(data);
      }
      if(#(data = sc.get("stand.friction.threshold")) > 0){
        `c.m.stand_friction_threshold = .com.atof(data);
      }
      if(#(data = sc.get("crouch.friction.threshold")) > 0){
        `c.m.crouch_friction_threshold = .com.atof(data);
      }
      if(#(data = sc.get("air.gethit.groundlevel")) > 0){
        `c.m.air_gethit_groundlevel = .com.atof(data);
      }
      if(#(data = sc.get("air.gethit.groundrecover.ground.threshold")) > 0){
        `c.m.air_gethit_groundrecover_ground_threshold = .com.atof(data);
      }
      if(#(data = sc.get("air.gethit.groundrecover.groundlevel")) > 0){
        `c.m.air_gethit_groundrecover_groundlevel = .com.atof(data);
      }
      if(#(data = sc.get("air.gethit.airrecover.threshold")) > 0){
        `c.m.air_gethit_airrecover_threshold = .com.atof(data);
      }
      if(#(data = sc.get("air.gethit.airrecover.yaccel")) > 0){
        `c.m.air_gethit_airrecover_yaccel = .com.atof(data);
      }
      if(#(data = sc.get("air.gethit.trip.groundlevel")) > 0){
        `c.m.air_gethit_trip_groundlevel = .com.atof(data);
      }
      if(#(data = sc.get("down.bounce.offset")) > 0){
        .com.readPair!float?(
          `c.m.down_bounce_offsetx=, `c.m.down_bounce_offsety=, data);
      }
      if(#(data = sc.get("down.bounce.yaccel")) > 0){
        `c.m.down_bounce_yaccel = .com.atof(data);
      }
      if(#(data = sc.get("down.bounce.groundlevel")) > 0){
        `c.m.down_bounce_groundlevel = .com.atof(data);
      }
      if(#(data = sc.get("down.friction.threshold")) > 0){
        `c.m.down_friction_threshold = .com.atof(data);
      }
    }
    void remap(&.com.Section sc=)
    {
      ^/char data;
      void map(|.cmd.Key k=, |.cmd.Key nk=)
      {
        `data = .s.toLower(`data);
        branch{
        cond .s.equ(`data, "x"):
          k  = .cmd.Key:: x;
          nk = .cmd.Key::nx;
        cond .s.equ(`data, "y"):
          k  = .cmd.Key:: y;
          nk = .cmd.Key::ny;
        cond .s.equ(`data, "z"):
          k  = .cmd.Key:: z;
          nk = .cmd.Key::nz;
        cond .s.equ(`data, "a"):
          k  = .cmd.Key:: a;
          nk = .cmd.Key::na;
        cond .s.equ(`data, "b"):
          k  = .cmd.Key:: b;
          nk = .cmd.Key::nb;
        cond .s.equ(`data, "c"):
          k  = .cmd.Key:: c;
          nk = .cmd.Key::nc;
        cond .s.equ(`data, "s"):
          k  = .cmd.Key:: s;
          nk = .cmd.Key::ns;
        }
      }
      if(#(data = sc.get("x")) > 0) map(.cmd.x=, .cmd.nx=);
      if(#(data = sc.get("y")) > 0) map(.cmd.y=, .cmd.ny=);
      if(#(data = sc.get("z")) > 0) map(.cmd.z=, .cmd.nz=);
      if(#(data = sc.get("a")) > 0) map(.cmd.a=, .cmd.na=);
      if(#(data = sc.get("b")) > 0) map(.cmd.b=, .cmd.nb=);
      if(#(data = sc.get("c")) > 0) map(.cmd.c=, .cmd.nc=);
      if(#(data = sc.get("s")) > 0) map(.cmd.s=, .cmd.ns=);
    }
    ~$void(&.com.Section=) defaults = [void(&.com.Section sc=){
      ^/char data;
      if(#(data = sc.get("command.time")) > 0){
        `cmdl~defaultTime = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("command.buffer.time")) > 0){
        `cmdl~defaultBufferTime = .m.max!int?(1)<, .com.atonOF!int?(data);
      }
    }];
    ~$^/char(^^/char, index=) command = [^/char(^^/char lines, index i=){
      ^/char sec = lines[i];
      ^/char secname = .com.sectionName(sec=);
      if(#secname == 0) ret "";
      i++;
      &.com.Section sc.parse(lines, i=);
      if(!.s.equ(secname[0 .. 7], "command")) ret "";
      `cmdl~ctmp.new(1);
      `cmdl~ctmp~time = `cmdl~defaultTime;
      `cmdl~ctmp~buffertime = `cmdl~defaultBufferTime;
      ^/char data, err;
      if(#sc.getText("name", data=)=>err > 0) ret "name: " + err;
      `cmdl~ctmp~name = data;
      if(#(data = sc.get("time")) > 0){
        `cmdl~ctmp~time = .com.atonOF!int?(data);
      }
      if(#(data = sc.get("buffer.time")) > 0){
        `cmdl~ctmp~buffertime = .m.max!int?(1)<, .com.atonOF!int?(data);
      }
      if(#(data = sc.get("command")) > 0) `cmdl~ctmp~readCmd(data);
      if(#`cmdl~ctmp~cmd == 1 && `cmdl~ctmp~cmd~slash){
        `cmdl~ctmp~buffertime = 1;
      }
      `cmdl~add(`cmdl~ctmp<>=);
      ret "";
    }];
    bool unicode = false;
    bool dataflg = true, sizeflg = true, velocityflg = true;
    bool movementflg = true;
    ~$void(^^/char, index=) cns = [void(^^/char lines, index i=){
      ^/char sec = lines[i];
      ^/char secname = .com.sectionName(sec=);
      if(#secname == 0) ret;
      i++;
      &.com.Section sc.parse(lines, i=);
      branch{
      cond .s.equ(secname, "data"):
        if(dataflg) data(sc=);
        dataflg = false;
      cond .s.equ(secname, "size"):
        if(sizeflg) size(sc=);
        sizeflg = false;
        if(`c.s.proj_doscale != 0){
          `c.s.proj_xscale = `c.s.xscale;
          `c.s.proj_yscale = `c.s.yscale;
        }
      cond .s.equ(secname, "velocity"):
        if(velocityflg) velocity(sc=);
        velocityflg = false;
      cond .s.equ(secname, "movement"):
        if(movementflg) movement(sc=);
        movementflg = false;
      }
    }];
    bool remapflg = true, defaultsflg = true;
    ~$void(^^/char, index=) commandlist = [void(^^/char lines, index i=){
      ^/char sec = lines[i];
      ^/char secname = .com.sectionName(sec=);
      if(#secname == 0) ret;
      i++;
      &.com.Section sc.parse(lines, i=);
      branch{
      cond .s.equ(secname, "remap"):
        if(remapflg) remap(sc=);
        remapflg = false;
      cond .s.equ(secname, "defaults"):
        if(defaultsflg) defaults(:sc=:);
        defaultsflg = false;
      }
    }];
    ^/char error;
    `playerno = no;
    `cmd = "";
    `cns = "";
    `st.new(0);
    `stcommon = "";
    ^char mainbuf = .com.loadText(def, unicode=);
    %^/char lines = .com.splitLines(mainbuf);
    .s.each!^/char?([void(^/char l=){l=.s.trim(l);}], lines);
    .com.mugenversion(lines, `mver0=, `mver1=);
    files(lines, unicode);
    if(
      #.com.loadFile(def, `cns=)=>error <, [^/char(^/char f){
        ret
          #.com.loadText(f, unicode=)=>mainbuf > 0
          ? "" : .com.FileReadError;
      }] > 0)
    {
      ret def + ":"\r\n + error;
    }
    lines = .com.splitLines(mainbuf);
    .s.each!^/char?([void(^/char l=){l=.s.trim(l);}], lines);
    `c.reset();
    loop{index i = 0; while; do:
      cns(:lines, i=:);
      i++;
    while i < #lines:}
    if(
      #.com.loadFile(def, `cmd=)=>error <, [^/char(^/char f){
        ret
          #.com.loadText(f, unicode=)=>mainbuf > 0
          ? "" : .com.FileReadError;
      }] > 0)
    {
      ret def + ":"\r\n + error;
    }
    lines = .com.splitLines(mainbuf);
    .s.each!^/char?([void(^/char l=){l=.s.trim(l);}], lines);
    .cmd.resetReadKeymap();
    if(#.chr.chars[no]<>~cmd == 0) .chr.chars[no]<>~cmd.new(#.chr.chars);
    .chr.chars[no]<>~cmd~buffer.new(1);
    loop{index i = 1; while; do:
      .chr.chars[no]<>~cmd[i].buffer = .chr.chars[no]<>~cmd~buffer;
      i++;
    while i < #.chr.chars[no]<>~cmd:}
    `cmdl = .chr.chars[no]<>~cmd[`playerno..`playerno+1];
    loop{index i = 0; while; do:
      commandlist(:lines, i=:);
      i++;
    while i < #lines:}
    loop{index i = 0, oi; while; do:
      oi = i;
      if(#(error = command(:lines, i=:)) > 0){
        ret .errmes(`cmd, lines[oi], oi, error);
      }
      i++;
    while i < #lines:}
    `stnoList.new(0);
    `stnoTable.clear();
    .chr.wakewakaLength[no] = 0;
    %char buf;
    loop{index i = 0; while; do:
      if(#`st[i] > 0 && #`stateBulid(buf=, def, `st[i]=)=>error > 0) ret error;
      i++;
    while i < #`st:}
    if(#`stateBulid(buf=, def, `cmd=)=>error > 0) ret error;
    if(#`stcommon > 0 && #`stateBulid(buf=, def, `stcommon=)=>error > 0){
      ret error;
    }
    ^/char minus = "ssz/minus.cns";
    if(#`stateBulid(buf=, def, minus=)=>error > 0) ret error;
    buf .=
      "public void c.Char::stateInit" .= ''`playerno .= "P()"\r\n
      "{"\r\n
      \t"^&`State st.new(" .= ''#`stnoList .= ");"\r\n;
    loop{index i = 0; while; do:
      if(`stnoList[i].no >= 0 && !`stnoList[i].i){
        buf .=
          \t"st[" .= ''i .= "].stateDef=`" .= `stnoList[i].proc .= "Init;"
          \t"st[" .= ''i .= "].state=`" .= `stnoList[i].proc .= ";"
          ".states[" .= ''`playerno .= "].set("
          .= ''`stnoList[i].no .= ",st[" .= ''i
          .= ".." .= ''(i+1) .= "]);"\r\n;
      }
      i++;
    while i < #`stnoList:}
    buf .=
      \t"`sysfvar[.fX] = 0.0;"\r\n
      \t"`sysfvar[.fY] = 0.0;"\r\n
      \t"`sysfvar[.fVX] = 0.0;"\r\n
      \t"`sysfvar[.fVY] = 0.0;"\r\n
      \t"`sysivar[.iLIFEMAX] = `sysivar[.iLIFEMAX2] = "
      .= ''`c.d.life .= ";"\r\n
      \t"`sysivar[.iPOWERMAX] = `sysivar[.iPOWERMAX2] = "
      .= ''`c.d.power .= ";"\r\n
      \t"`sysivar[.iATTACK] = " .= ''`c.d.attack .= ";"\r\n
      \t"`sysivar[.iDEFENCE] = " .= ''`c.d.defence .= ";"\r\n
      \t"`sysfvar[.fFALL_DEFENCE_MUL] = "
      .= `fToS(`c.d.fall_defence_mul) .= ";"\r\n
      \t"`sysivar[.iLIEDOWN_TIME] = " .= ''`c.d.liedown_time .= ";"\r\n
      \t"`sysivar[.iAIRJUGGLE] = " .= ''`c.d.airjuggle .= ";"\r\n
      \t"`sysivar[.iSPARKNO] = "
      .= (`c.d.sparkno >= 0 ? ''`c.d.sparkno : "!.com.IERR") .= ";"\r\n
      \t"`sysivar[.iGUARD_SPARKNO] = " .= (
        `c.d.guard_sparkno >= 0
        ? ''`c.d.guard_sparkno : "!.com.IERR") .= ";"\r\n
      \t"`sysivar[.iKO_ECHO] = " .= ''`c.d.ko_echo .= ";"\r\n
      \t"`sysivar[.iVOLUME] = " .= ''`c.d.volume .= ";"\r\n
      \t"`sysivar[.iINTPERSISTINDEX] = .m.max!int?(0)<, .m.min!int?(#`ivar, "
      .= ''`c.d.intpersistindex .= ");"\r\n
      \t"`sysivar[.iFLOATPERSISTINDEX] = .m.max!int?(0)<, .m.min!int?(#`fvar, "
      .= ''`c.d.floatpersistindex .= ");"\r\n
      \t"`sysfvar[.fXSCALE] = " .= `fToS(`c.s.xscale) .= ";"\r\n
      \t"`sysfvar[.fYSCALE] = " .= `fToS(`c.s.yscale) .= ";"\r\n
      \t"`sysivar[.iGROUND_BACK] = " .= ''`c.s.ground_back .= ";"\r\n
      \t"`sysivar[.iGROUND_FRONT] = " .= ''`c.s.ground_front .= ";"\r\n
      \t"`sysivar[.iAIR_BACK] = " .= ''`c.s.air_back .= ";"\r\n
      \t"`sysivar[.iAIR_FRONT] = " .= ''`c.s.air_front .= ";"\r\n
      \t"`sysivar[.iHEIGHT] = " .= ''`c.s.height .= ";"\r\n
      \t"`sysivar[.iATTACK_DIST] = " .= ''`c.s.attack_dist .= ";"\r\n
      \t"`sysivar[.iPROJ_ATTACK_DIST] = " .= ''`c.s.proj_attack_dist .= ";"\r\n
      \t"`sysivar[.iPROJ_DOSCALE] = " .= ''`c.s.proj_doscale .= ";"\r\n
      \t"`sysivar[.iHEAD_POSX] = " .= ''`c.s.head_posx .= ";"\r\n
      \t"`sysivar[.iHEAD_POSY] = " .= ''`c.s.head_posy .= ";"\r\n
      \t"`sysivar[.iMID_POSX] = " .= ''`c.s.mid_posx .= ";"\r\n
      \t"`sysivar[.iMID_POSY] = " .= ''`c.s.mid_posy .= ";"\r\n
      \t"`sysivar[.iSHADOWOFFSET] = " .= ''`c.s.shadowoffset .= ";"\r\n
      \t"`sysivar[.iDRAW_OFFSETX] = " .= ''`c.s.draw_offsetx .= ";"\r\n
      \t"`sysivar[.iDRAW_OFFSETY] = " .= ''`c.s.draw_offsety .= ";"\r\n
      \t"`sysivar[.iZ_WIDTH] = " .= ''`c.s.z_width .= ";"\r\n
      \t"`sysivar[.iATTACK_Z_WIDTH_FRONT] = "
      .= ''`c.s.attack_z_width_front .= ";"\r\n
      \t"`sysivar[.iATTACK_Z_WIDTH_BACK] = "
      .= ''`c.s.attack_z_width_back .= ";"\r\n
      \t"`sysfvar[.fWALK_FWD] = " .= `fToS(`c.v.walk_fwd) .= ";"\r\n
      \t"`sysfvar[.fWALK_BACK] = " .= `fToS(`c.v.walk_back) .= ";"\r\n
      \t"`sysfvar[.fRUN_FWDX] = " .= `fToS(`c.v.run_fwdx) .= ";"\r\n
      \t"`sysfvar[.fRUN_FWDY] = " .= `fToS(`c.v.run_fwdy) .= ";"\r\n
      \t"`sysfvar[.fRUN_BACKX] = " .= `fToS(`c.v.run_backx) .= ";"\r\n
      \t"`sysfvar[.fRUN_BACKY] = " .= `fToS(`c.v.run_backy) .= ";"\r\n
      \t"`sysfvar[.fJUMP_NEUX] = " .= `fToS(`c.v.jump_neux) .= ";"\r\n
      \t"`sysfvar[.fJUMP_NEUY] = " .= `fToS(`c.v.jump_neuy) .= ";"\r\n
      \t"`sysfvar[.fJUMP_BACK] = " .= `fToS(`c.v.jump_back) .= ";"\r\n
      \t"`sysfvar[.fJUMP_FWD] = " .= `fToS(`c.v.jump_fwd) .= ";"\r\n
      \t"`sysfvar[.fRUNJUMP_BACKX] = " .= `fToS(`c.v.runjump_backx) .= ";"\r\n
      \t"`sysfvar[.fRUNJUMP_BACKY] = " .= `fToS(`c.v.runjump_backy) .= ";"\r\n
      \t"`sysfvar[.fRUNJUMP_FWDX] = " .= `fToS(`c.v.runjump_fwdx) .= ";"\r\n
      \t"`sysfvar[.fRUNJUMP_FWDY] = " .= `fToS(`c.v.runjump_fwdy) .= ";"\r\n
      \t"`sysfvar[.fAIRJUMP_NEUX] = " .= `fToS(`c.v.airjump_neux) .= ";"\r\n
      \t"`sysfvar[.fAIRJUMP_NEUY] = " .= `fToS(`c.v.airjump_neuy) .= ";"\r\n
      \t"`sysfvar[.fAIRJUMP_BACK] = " .= `fToS(`c.v.airjump_back) .= ";"\r\n
      \t"`sysfvar[.fAIRJUMP_FWD] = " .= `fToS(`c.v.airjump_fwd) .= ";"\r\n
      \t"`sysfvar[.fAIR_GETHIT_GROUNDRECOVERX] = "
      .= `fToS(`c.v.air_gethit_groundrecoverx) .= ";"\r\n
      \t"`sysfvar[.fAIR_GETHIT_GROUNDRECOVERY] = "
      .= `fToS(`c.v.air_gethit_groundrecovery) .= ";"\r\n
      \t"`sysfvar[.fAIR_GETHIT_AIRRECOVER_MULX] = "
      .= `fToS(`c.v.air_gethit_airrecover_mulx) .= ";"\r\n
      \t"`sysfvar[.fAIR_GETHIT_AIRRECOVER_MULY] = "
      .= `fToS(`c.v.air_gethit_airrecover_muly) .= ";"\r\n
      \t"`sysfvar[.fAIR_GETHIT_AIRRECOVER_ADDX] = "
      .= `fToS(`c.v.air_gethit_airrecover_addx) .= ";"\r\n
      \t"`sysfvar[.fAIR_GETHIT_AIRRECOVER_ADDY] = "
      .= `fToS(`c.v.air_gethit_airrecover_addy) .= ";"\r\n
      \t"`sysfvar[.fAIR_GETHIT_AIRRECOVER_BACK] = "
      .= `fToS(`c.v.air_gethit_airrecover_back) .= ";"\r\n
      \t"`sysfvar[.fAIR_GETHIT_AIRRECOVER_FWD] = "
      .= `fToS(`c.v.air_gethit_airrecover_fwd) .= ";"\r\n
      \t"`sysfvar[.fAIR_GETHIT_AIRRECOVER_UP] = "
      .= `fToS(`c.v.air_gethit_airrecover_up) .= ";"\r\n
      \t"`sysfvar[.fAIR_GETHIT_AIRRECOVER_DOWN] = "
      .= `fToS(`c.v.air_gethit_airrecover_down) .= ";"\r\n
      \t"`sysfvar[.fWALK_UP_X] = " .= `fToS(`c.v.walk_up_x) .= ";"\r\n
      \t"`sysfvar[.fWALK_DOWN_X] = " .= `fToS(`c.v.walk_down_x) .= ";"\r\n
      \t"`sysfvar[.fRUN_UP_X] = " .= `fToS(`c.v.run_up_x) .= ";"\r\n
      \t"`sysfvar[.fRUN_UP_Y] = " .= `fToS(`c.v.run_up_y) .= ";"\r\n
      \t"`sysfvar[.fRUN_DOWN_X] = " .= `fToS(`c.v.run_down_x) .= ";"\r\n
      \t"`sysfvar[.fRUN_DOWN_Y] = " .= `fToS(`c.v.run_down_y) .= ";"\r\n
      \t"`sysfvar[.fJUMP_UP_X] = " .= `fToS(`c.v.jump_up_x) .= ";"\r\n
      \t"`sysfvar[.fJUMP_DOWN_X] = " .= `fToS(`c.v.jump_down_x) .= ";"\r\n
      \t"`sysfvar[.fRUNJUMP_UP_X] = " .= `fToS(`c.v.runjump_up_x) .= ";"\r\n
      \t"`sysfvar[.fRUNJUMP_DOWN_X] = "
      .= `fToS(`c.v.runjump_down_x) .= ";"\r\n
      \t"`sysfvar[.fAIRJUMP_UP_X] = " .= `fToS(`c.v.airjump_up_x) .= ";"\r\n
      \t"`sysfvar[.fAIRJUMP_DOWN_X] = "
      .= `fToS(`c.v.airjump_down_x) .= ";"\r\n
      \t"`sysivar[.iAIRJUMP_CNT] = 0;"\r\n
      \t"`sysivar[.iAIRJUMP_NUM] = " .= ''`c.m.airjump_num .= ";"\r\n
      \t"`sysivar[.iAIRJUMP_HEIGHT] = " .= ''`c.m.airjump_height .= ";"\r\n
      \t"`sysfvar[.fYACCEL] = " .= `fToS(`c.m.yaccel) .= ";"\r\n
      \t"`sysfvar[.fSTAND_FRICTION] = "
      .= `fToS(`c.m.stand_friction) .= ";"\r\n
      \t"`sysfvar[.fCROUCH_FRICTION] = "
      .= `fToS(`c.m.crouch_friction) .= ";"\r\n
      \t"`sysfvar[.fSTAND_FRICTION_THRESHOLD] = "
      .= `fToS(`c.m.stand_friction_threshold) .= ";"\r\n
      \t"`sysfvar[.fCROUCH_FRICTION_THRESHOLD] = "
      .= `fToS(`c.m.crouch_friction_threshold) .= ";"\r\n
      \t"`sysfvar[.fAIR_GETHIT_GROUNDLEVEL] = "
      .= `fToS(`c.m.air_gethit_groundlevel) .= ";"\r\n
      \t"`sysfvar[.fAIR_GETHIT_GROUNDRECOVER_GROUND_THRESHOLD] = "
      .= `fToS(`c.m.air_gethit_groundrecover_ground_threshold) .= ";"\r\n
      \t"`sysfvar[.fAIR_GETHIT_GROUNDRECOVER_GROUNDLEVEL] = "
      .= `fToS(`c.m.air_gethit_groundrecover_groundlevel) .= ";"\r\n
      \t"`sysfvar[.fAIR_GETHIT_AIRRECOVER_THRESHOLD] = "
      .= `fToS(`c.m.air_gethit_airrecover_threshold) .= ";"\r\n
      \t"`sysfvar[.fAIR_GETHIT_AIRRECOVER_YACCEL] = "
      .= `fToS(`c.m.air_gethit_airrecover_yaccel) .= ";"\r\n
      \t"`sysfvar[.fAIR_GETHIT_TRIP_GROUNDLEVEL] = "
      .= `fToS(`c.m.air_gethit_trip_groundlevel) .= ";"\r\n
      \t"`sysfvar[.fDOWN_BOUNCE_OFFSETX] = "
      .= `fToS(`c.m.down_bounce_offsetx) .= ";"\r\n
      \t"`sysfvar[.fDOWN_BOUNCE_OFFSETY] = "
      .= `fToS(`c.m.down_bounce_offsety) .= ";"\r\n
      \t"`sysfvar[.fDOWN_BOUNCE_YACCEL] = "
      .= `fToS(`c.m.down_bounce_yaccel) .= ";"\r\n
      \t"`sysfvar[.fDOWN_BOUNCE_GROUNDLEVEL] = "
      .= `fToS(`c.m.down_bounce_groundlevel) .= ";"\r\n
      \t"`sysfvar[.fDOWN_FRICTION_THRESHOLD] = "
      .= `fToS(`c.m.down_friction_threshold) .= ";"\r\n
      \t"`state_1 = `s_1_" .= ''`playerno .= "P;"\r\n
      \t"`state_2 = `s_2_" .= ''`playerno .= "P;"\r\n
      \t"`state_3 = `s_3_" .= ''`playerno .= "P;"\r\n
      \t"`state_i1 = `s_I1_" .= ''`playerno .= "P;"\r\n
      \t"`clearSpSysVar();"\r\n
      "}"\r\n;
    code = buf;
    ret "";
  }
}


